jef.disconnection.impl
Class DefaultDisconnectedField

java.lang.Object
  extended by jef.disconnection.impl.DefaultDisconnectedField
All Implemented Interfaces:
DisconnectedField, DisconnectedStructure
Direct Known Subclasses:
DefaultDisconnectedMethod

public class DefaultDisconnectedField
extends java.lang.Object
implements DisconnectedField

Default implementation of the DisconnectedField interface.

Author:
frusso@dev.java.net

Field Summary
protected  AttributesTable attributes
           
protected  ConstantPoolTable constantPoolTable
           
protected  FieldsTable fields
           
protected  java.util.HashMap<java.lang.String,Dna> innerClasses
           
protected  java.lang.String srcClassFqn
           
 
Constructor Summary
DefaultDisconnectedField()
          Creates a new instance of DefaultDisconnectedField
 
Method Summary
 void addAttribute(Attribute attr)
          This method allows adding a class-level attribute to this disconnected structure.
 void addField(FieldInfoStructure fi)
          Adds a new FiledInfoStructure to the set of fields.
 void addInnerClass(java.lang.String fqn, Dna innerDna)
          This method adds a new inner Dna to the disconnected data-structure.
 AttributesTable getAttributes()
          Returns the whole list of added attributes by reference, or null.
 ConstantPoolTable getConstantPoolTable()
          Gets the ConstantPoolTable instance containing all the cp_infos required by both the fields and methods stored in the current DisconnectedMethod instance.
 FieldsTable getFields()
          Gets the FieldsTable instance containing all the fields required by the methods stored in the current DisconnectedMethod instance.
 java.util.HashMap<java.lang.String,Dna> getInnerClasses()
          Returns the map of inner Dnas indexed by their fully qualified class names.
 java.lang.String getSrcClassFqn()
          This method returns the FQN of the Java class this structure belonged to.
 void setConstantPoolTable(ConstantPoolTable cpt)
          Sets the ConstantPoolTable instance containing all the cp_infos required by both the fields and methods stored in the current DisconnectedMethod instance.
 void setFields(FieldsTable ft)
          Sets the FieldsTable instance containing all the fields required by the methods stored in the current DisconnectedMethod instance.
 void setSrcClassFqn(java.lang.String fqn)
          This method sets the FQN of the Java class this structure belonged to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

innerClasses

protected java.util.HashMap<java.lang.String,Dna> innerClasses

constantPoolTable

protected ConstantPoolTable constantPoolTable

fields

protected FieldsTable fields

srcClassFqn

protected java.lang.String srcClassFqn

attributes

protected AttributesTable attributes
Constructor Detail

DefaultDisconnectedField

public DefaultDisconnectedField()
                         throws InstantiatorException
Creates a new instance of DefaultDisconnectedField

Throws:
InstantiatorException
Method Detail

setConstantPoolTable

public void setConstantPoolTable(ConstantPoolTable cpt)
Sets the ConstantPoolTable instance containing all the cp_infos required by both the fields and methods stored in the current DisconnectedMethod instance.

Specified by:
setConstantPoolTable in interface DisconnectedField
Parameters:
cpt - The ConstantPoolTable instance

getConstantPoolTable

public ConstantPoolTable getConstantPoolTable()
Gets the ConstantPoolTable instance containing all the cp_infos required by both the fields and methods stored in the current DisconnectedMethod instance.

Specified by:
getConstantPoolTable in interface DisconnectedField
Returns:
ConstantPoolTable The ConstantPoolTable instance

setFields

public void setFields(FieldsTable ft)
Sets the FieldsTable instance containing all the fields required by the methods stored in the current DisconnectedMethod instance.

Specified by:
setFields in interface DisconnectedField
Parameters:
ft - The FieldsTable instance

getFields

public FieldsTable getFields()
Gets the FieldsTable instance containing all the fields required by the methods stored in the current DisconnectedMethod instance.

Specified by:
getFields in interface DisconnectedField
Returns:
FieldsTable The FieldsTable instance

addField

public void addField(FieldInfoStructure fi)
              throws InstantiatorException
Adds a new FiledInfoStructure to the set of fields.

Specified by:
addField in interface DisconnectedField
Parameters:
final - The FiledInfoStructure
Throws:
InstantiatorException

setSrcClassFqn

public void setSrcClassFqn(java.lang.String fqn)
Description copied from interface: DisconnectedField
This method sets the FQN of the Java class this structure belonged to.

Specified by:
setSrcClassFqn in interface DisconnectedField
Parameters:
fqn - The source Java class FQN

getSrcClassFqn

public java.lang.String getSrcClassFqn()
Description copied from interface: DisconnectedField
This method returns the FQN of the Java class this structure belonged to.

Specified by:
getSrcClassFqn in interface DisconnectedField
Returns:
String

addAttribute

public void addAttribute(Attribute attr)
                  throws InstantiatorException
Description copied from interface: DisconnectedField
This method allows adding a class-level attribute to this disconnected structure. All the attributes added by means of this method will be added to the class-level attributes of the resulting class.

Specified by:
addAttribute in interface DisconnectedField
Parameters:
attr - The attribute to add
Throws:
InstantiatorException

getAttributes

public AttributesTable getAttributes()
Description copied from interface: DisconnectedField
Returns the whole list of added attributes by reference, or null.

Specified by:
getAttributes in interface DisconnectedField
Returns:
The added attributes or null

addInnerClass

public void addInnerClass(java.lang.String fqn,
                          Dna innerDna)
Description copied from interface: DisconnectedField
This method adds a new inner Dna to the disconnected data-structure.

Specified by:
addInnerClass in interface DisconnectedField

getInnerClasses

public java.util.HashMap<java.lang.String,Dna> getInnerClasses()
Description copied from interface: DisconnectedField
Returns the map of inner Dnas indexed by their fully qualified class names.

Specified by:
getInnerClasses in interface DisconnectedField
Returns:
The map of inner Dnas indexed by their fully qualified class names