jef.disconnection
Interface DisconnectedField

All Superinterfaces:
DisconnectedStructure
All Known Subinterfaces:
DisconnectedMethod
All Known Implementing Classes:
DefaultDisconnectedField, DefaultDisconnectedMethod

public interface DisconnectedField
extends DisconnectedStructure

This interface represents the set of information needed to fully describe a Java class' field. A DisconnectedField is used to "extract" a field definition from a Java class in order to inject it into another Java class, modifying the receiving class behaviour.

Author:
Francesco Russo frusso@dev.java.net

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 stored in the current DisconnectedField instance.
 FieldsTable getFields()
          Gets the FieldsTable instance containing all the extracted fields.
 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 stored in the current DisconnectedField instance.
 void setFields(FieldsTable ft)
          Sets the FieldsTable instance containing all the extracted fields.
 void setSrcClassFqn(java.lang.String fqn)
          This method sets the FQN of the Java class this structure belonged to.
 

Method Detail

setConstantPoolTable

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

Parameters:
cpt - The ConstantPoolTable instance

getConstantPoolTable

ConstantPoolTable getConstantPoolTable()
Gets the ConstantPoolTable instance containing all the cp_infos required by both the fields stored in the current DisconnectedField instance.

Returns:
ConstantPoolTable The ConstantPoolTable instance

setFields

void setFields(FieldsTable ft)
Sets the FieldsTable instance containing all the extracted fields.

Parameters:
ft - The FieldsTable instance

getFields

FieldsTable getFields()
Gets the FieldsTable instance containing all the extracted fields. DisconnectedMethod instance.

Returns:
FieldsTable The FieldsTable instance

addField

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

Parameters:
fi - The FiledInfoStructure
Throws:
InstantiatorException

setSrcClassFqn

void setSrcClassFqn(java.lang.String fqn)
This method sets the FQN of the Java class this structure belonged to.

Parameters:
fqn - The source Java class FQN

getSrcClassFqn

java.lang.String getSrcClassFqn()
This method returns the FQN of the Java class this structure belonged to.

Returns:
String

addAttribute

void addAttribute(Attribute attr)
                  throws InstantiatorException
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.

Parameters:
attr - The attribute to add
Throws:
InstantiatorException

getAttributes

AttributesTable getAttributes()
Returns the whole list of added attributes by reference, or null.

Returns:
The added attributes or null

addInnerClass

void addInnerClass(java.lang.String fqn,
                   Dna innerDna)
This method adds a new inner Dna to the disconnected data-structure.

Parameters:
fqn -
innerDna -

getInnerClasses

java.util.HashMap<java.lang.String,Dna> getInnerClasses()
Returns the map of inner Dnas indexed by their fully qualified class names.

Returns:
The map of inner Dnas indexed by their fully qualified class names