org.apache.beehive.controls.runtime.generator
Class AptControlClient

Object
  extended by AptType
      extended by AptControlClient
All Implemented Interfaces:
Generator

public class AptControlClient
extends AptType
implements Generator

The AptControlClient class contains metadata about a class that contains nested control references (AptControlField).


Constructor Summary
AptControlClient(Declaration decl, TwoPhaseAnnotationProcessor ap)
          Constructs a new ControlClient instance where information is derived from APT metadata
 
Method Summary
 List<GeneratorOutput> getCheckOutput(Filer filer)
          Returns the information necessary to generate a ImplInitializer from this ControlImplementation.
 ArrayList<AptControlField> getControls()
          Returns the list of ControlFields declared directly by this ControlImpl
 AptField getField(String name)
          Returns the field with the specified name
 String[] getGeneratedTypes()
          Returns the list of fully qualified class names for types that are derived from this Generator
 List<GeneratorOutput> getGenerateOutput(Filer filer)
          Returns the information necessary to generate a ClientInitializer from this control
 String getID(AptControlField control)
          Returns a unique ID for a control field
 AptControlClient getSuperClass()
          Returns the super class for this class
 String getSuperClientName()
          Returns the fully qualified classname of the closest control client in the inheritance chain.
 boolean hasControls()
          Returns true if the implemenation class contains any nested controls
 boolean hasSuperClient()
           
protected  ArrayList<AptControlField> initControls()
          Initializes the list of ControlFields declared directly by this ControlClient
protected  void initEventAdaptors()
          Initializes the list of EventAdaptors for this ControlImpl
 boolean needsFieldInit()
          Returns true if the control client needs field initialization support
protected  boolean needsUniqueID()
          Returns true if this type of client requires that nested controls have unique identifiers
 
Methods inherited from class AptType
getClassName, getFormalClassName, getFormalShortName, getFormalTypeParameterNames, getFormalTypeParameters, getPackage, getShortName, getTypeDeclaration, setDeclaration
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AptControlClient

public AptControlClient(Declaration decl,
                        TwoPhaseAnnotationProcessor ap)
Constructs a new ControlClient instance where information is derived from APT metadata

Parameters:
decl - the annotated declaration
Method Detail

needsUniqueID

protected boolean needsUniqueID()
Returns true if this type of client requires that nested controls have unique identifiers


getID

public String getID(AptControlField control)
Returns a unique ID for a control field


getControls

public ArrayList<AptControlField> getControls()
Returns the list of ControlFields declared directly by this ControlImpl


hasControls

public boolean hasControls()
Returns true if the implemenation class contains any nested controls


needsFieldInit

public boolean needsFieldInit()
Returns true if the control client needs field initialization support


getField

public AptField getField(String name)
Returns the field with the specified name


getGeneratedTypes

public String[] getGeneratedTypes()
Returns the list of fully qualified class names for types that are derived from this Generator

Specified by:
getGeneratedTypes in interface Generator

getCheckOutput

public List<GeneratorOutput> getCheckOutput(Filer filer)
                                     throws IOException
Returns the information necessary to generate a ImplInitializer from this ControlImplementation.

Specified by:
getCheckOutput in interface Generator
Throws:
IOException

getGenerateOutput

public List<GeneratorOutput> getGenerateOutput(Filer filer)
                                        throws IOException
Returns the information necessary to generate a ClientInitializer from this control

Specified by:
getGenerateOutput in interface Generator
Throws:
IOException

initControls

protected ArrayList<AptControlField> initControls()
Initializes the list of ControlFields declared directly by this ControlClient


hasSuperClient

public boolean hasSuperClient()

getSuperClientName

public String getSuperClientName()
Returns the fully qualified classname of the closest control client in the inheritance chain.

Returns:
class name of the closest control client

getSuperClass

public AptControlClient getSuperClass()
Returns the super class for this class


initEventAdaptors

protected void initEventAdaptors()
Initializes the list of EventAdaptors for this ControlImpl