implementations
Class JavaInheritance

java.lang.Object
  |
  +--implementations.JavaImplementationGenerator
        |
        +--implementations.JavaInheritance
All Implemented Interfaces:
ImplementationGeneratorI
Direct Known Subclasses:
JAsCoInheritance, SEESCOAInheritance

public class JavaInheritance
extends JavaImplementationGenerator

Implementation generator plugin class for implementing an Inheritance composite in Java.

Version:
0.1.18, 22 November 2003
Author:
Dennis Wagelaar

Constructor Summary
JavaInheritance()
           
 
Method Summary
 void apply(ImplementationGenerator implementation, GenerateImplementationVisitor generateImpl)
          Applies the implementation generator.
protected  void applyPerChild()
          Applies the implementation generator for each Child concept.
protected  void applyToChild(Concept child, java.util.Collection parents)
          Applies the implementation generator to a Child concept.
protected  void applyToChildClass(Concept child, java.util.Collection parents)
          Applies the implementation generator to a Child concept as a Class.
protected  void applyToChildInterface(Concept child, java.util.Collection parents)
          Applies the implementation generator to a Child concept as an Interface.
protected  void checkRoles()
          Checks the composite roles for existence.
protected  CompositeRole getChildRole()
          Retrieves the child role of the composite.
protected  CompositeRole getParentRole()
          Retrieves the parent role of the composite.
 
Methods inherited from class implementations.JavaImplementationGenerator
createClause, createMethod, getClasses, getComposite, getConceptsFor, getCurrentImplementation, getCurrentImplementation, getImplGen, getInstanceName, getInterfaces, getModel, getPrimitives, getVisitor, insertImports, insertInheritance, insertMethod, insertMethodOverrideID, insertParameters, insertPrimitiveImplementation, insertPrimitiveImplementations, insertReturnType, insertVariables, isClass, isInterface, isMethod, isPrimitive, isStatic, lcfirst, setCurrentImplementation, setCurrentImplementation, ucfirst
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaInheritance

public JavaInheritance()
Method Detail

getParentRole

protected CompositeRole getParentRole()
Retrieves the parent role of the composite.
Returns:
The parent CompositeRole.

getChildRole

protected CompositeRole getChildRole()
Retrieves the child role of the composite.
Returns:
The child CompositeRole.

checkRoles

protected void checkRoles()
                   throws CoComposeException
Checks the composite roles for existence.
Throws:
CoComposeException - if a required role does not exist.

applyPerChild

protected void applyPerChild()
                      throws CoComposeException
Applies the implementation generator for each Child concept.
Throws:
CoComposeException - if generating implementation failed.

applyToChild

protected void applyToChild(Concept child,
                            java.util.Collection parents)
                     throws CoComposeException
Applies the implementation generator to a Child concept.
Parameters:
child - The concept to apply the role part for.
parents - The set of parent concepts.
Throws:
CoComposeException - if generating implementation failed.

applyToChildClass

protected void applyToChildClass(Concept child,
                                 java.util.Collection parents)
                          throws CoComposeException
Applies the implementation generator to a Child concept as a Class.
Parameters:
child - The concept to apply the role part for.
parents - The set of parent concepts.
Throws:
CoComposeException - if generating implementation failed.

applyToChildInterface

protected void applyToChildInterface(Concept child,
                                     java.util.Collection parents)
                              throws CoComposeException
Applies the implementation generator to a Child concept as an Interface.
Parameters:
child - The concept to apply the role part for.
parents - The set of parent concepts.
Throws:
CoComposeException - if generating implementation failed.

apply

public void apply(ImplementationGenerator implementation,
                  GenerateImplementationVisitor generateImpl)
           throws CoComposeException
Applies the implementation generator.
Overrides:
apply in class JavaImplementationGenerator
Parameters:
implementation - The implementation generator to apply.
generateImpl - The language specific code generation operation visitor.
Throws:
CoComposeException - if generating implementation failed.