|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjef.dna.infoStructures.impl.InfoStructureAncestor
public abstract class InfoStructureAncestor
This is the ancestor class of both the FieldInfo and the MethodInfo
implementation classes.
About cloning instances extending the InfoStructureAncestor abstract class:
the clone() method will return a new instance whose reference to the containing
Dna instance is set to null. It is up to you appropriately setting
it to the correct value.
| Field Summary | |
|---|---|
protected int |
accessFlags
|
protected AttribFactory |
attribFactory
|
protected int |
attributeCount
|
protected java.util.List<Attribute> |
attributes
|
protected int |
descriptorIndex
|
protected Dna |
dna
|
protected int |
nameIndex
|
| Constructor Summary | |
|---|---|
InfoStructureAncestor()
Creates a new instance of InfoStructureAncestor |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
The clone() method will return a new instance whose reference to the
containing Dna is not modified. |
abstract void |
fromStream(java.io.DataInputStream dis,
Dna dna)
Initialize the current InfoStructure from the provided stream. |
int |
getAccessFlags()
Get the method's access flags defining which access modifiers are applied to the current method. |
int |
getAttributeCount()
Get the number of the additional attributes of the current method. |
java.util.List<Attribute> |
getAttributes()
Instances contained within the input List have to be valid implementations
of the interfaces defined in the package dna.attributes. |
int |
getDescriptorIndex()
Set a valid index pointing to a constant pool table's entry of type ConstantUtf8 representing the description of the current method. |
Dna |
getDna()
Get a reference to the Dna instance this infoStructure entity
belongs to. |
int |
getNameIndex()
Set a valid index pointing to a constant pool table's entry of type ConstantUtf8. |
void |
setAccessFlags(int accessFlags)
Set the method's access flags defining which access modifiers are applied to the current method |
void |
setAttributeCount(int count)
Set the number of the additional attributes of the current method. |
void |
setAttributes(java.util.List<Attribute> attributes)
Instances contained within the input List have to be valid implementations
of the interfaces defined in the package dna.attributes. |
void |
setDescriptorIndex(int index)
Set a valid index pointing to a constant pool table's entry of type ConstantUtf8 representing the description of the current method. |
void |
setDna(Dna dna)
Set a reference to the Dna instance this infoStructure entity
belongs to. |
void |
setNameIndex(int nameIndex)
Set a valid index pointing to constant pool table's entry of type ConstantUtf8. |
abstract void |
toStream(java.io.DataOutputStream dos)
Serialize the InfoStructure to a stream. |
void |
updateRefs(int offset)
This method reorganizes all the references to constant pool table entries |
boolean |
validate()
This method has to perform a validation process over the FieldInfo according
to what specified by the JVM Official Specification. |
protected abstract void |
validateAccessFlags(ConstantPoolTable cpt)
|
protected void |
validateAttributeCount(ConstantPoolTable cpt)
|
protected void |
validateAttributes(ConstantPoolTable cpt)
|
protected void |
validateDescriptorIndex(ConstantPoolTable cpt)
|
protected void |
validateNameIndex(ConstantPoolTable cpt)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int accessFlags
protected int nameIndex
protected int descriptorIndex
protected int attributeCount
protected java.util.List<Attribute> attributes
protected Dna dna
protected AttribFactory attribFactory
| Constructor Detail |
|---|
public InfoStructureAncestor()
| Method Detail |
|---|
public void setAccessFlags(int accessFlags)
InfoStructure
setAccessFlags in interface InfoStructureaccessFlags - The mask of flags as defined by the Java VM Specification section 4.6public int getAccessFlags()
InfoStructure
getAccessFlags in interface InfoStructurepublic void setNameIndex(int nameIndex)
InfoStructure,
or a valid method name in the Java progr. language.
setNameIndex in interface InfoStructurenameIndex - The index pointin to a constant pool table entrypublic int getNameIndex()
InfoStructure,
or a valid method name in the Java progr. language.
getNameIndex in interface InfoStructurepublic void setDescriptorIndex(int index)
InfoStructure
setDescriptorIndex in interface InfoStructureindex - A valid index as described abovepublic int getDescriptorIndex()
InfoStructure
getDescriptorIndex in interface InfoStructurepublic void setAttributeCount(int count)
InfoStructure
setAttributeCount in interface InfoStructurecount - The number of this method's attributespublic int getAttributeCount()
InfoStructure
getAttributeCount in interface InfoStructurepublic void setAttributes(java.util.List<Attribute> attributes)
InfoStructureList have to be valid implementations
of the interfaces defined in the package dna.attributes.
setAttributes in interface InfoStructureattributes - The attributes associated with the current methodpublic java.util.List<Attribute> getAttributes()
InfoStructureList have to be valid implementations
of the interfaces defined in the package dna.attributes.
getAttributes in interface InfoStructurepublic void setDna(Dna dna)
InfoStructureDna instance this infoStructure entity
belongs to.
setDna in interface InfoStructurepublic Dna getDna()
InfoStructureDna instance this infoStructure entity
belongs to.
getDna in interface InfoStructureDna "container"public void updateRefs(int offset)
InfoStructure
updateRefs in interface InfoStructureoffset - offset
public abstract void fromStream(java.io.DataInputStream dis,
Dna dna)
throws DnaDeserializationException,
MissingDnaContainerException
InfoStructureInfoStructure from the provided stream. The provided
Dna instance, if not null, will replace the one set by a
formerly invoked setDna() method. Otherwise, should the both the provided
Dna instance and the one set by the setDna method be
null, this method will throw a MissingDnaContainerException.
fromStream in interface InfoStructuredis - The input stream the InfoStructure should be read fromdna - The Dna instance which will contain this InfoStructure
instance
DnaDeserializationException
MissingDnaContainerException
public abstract void toStream(java.io.DataOutputStream dos)
throws DnaSerializationException
InfoStructureInfoStructure to a stream.
toStream in interface InfoStructuredos - The output stream to write to
DnaSerializationException
public boolean validate()
throws FieldInfoValidationException,
InfoStructureAttributeOutOfRangeException,
MissingDnaContainerException,
MissingCPTableException
FieldInfo according
to what specified by the JVM Official Specification.
validate in interface InfoStructuretrue iff the validation is successful, false
otherwise
ValidationExceptionAncestor - Something failed with the validation process; further information are stored
within the raised exception. This exception might be a
FieldInfo|MethodInfo|AttributeInfoValidationException
MissingDnaContainerException - The validation process cannot be accomplished since any of the examined entities
is missing its own Dna container
MissingCPTableException - The validation process cannot be accomplished since there is no reference to the
ConstantPoolTable in the current Dna instance
FieldInfoValidationException - Something failed with the validation process; further information are stored
within the raised exception. This exception might be a
FieldInfo|MethodInfo|AttributeInfoValidationException
InfoStructureAttributeOutOfRangeException - The InfoStructure contains some attribute pointing to an invalid index of the
Constant Pool Table
protected abstract void validateAccessFlags(ConstantPoolTable cpt)
throws FieldInfoValidationException,
InfoStructureAttributeOutOfRangeException
FieldInfoValidationException
InfoStructureAttributeOutOfRangeException
protected void validateNameIndex(ConstantPoolTable cpt)
throws FieldInfoValidationException,
InfoStructureAttributeOutOfRangeException
FieldInfoValidationException
InfoStructureAttributeOutOfRangeException
protected void validateDescriptorIndex(ConstantPoolTable cpt)
throws FieldInfoValidationException,
InfoStructureAttributeOutOfRangeException
FieldInfoValidationException
InfoStructureAttributeOutOfRangeException
protected void validateAttributeCount(ConstantPoolTable cpt)
throws FieldInfoValidationException
FieldInfoValidationException
protected void validateAttributes(ConstantPoolTable cpt)
throws FieldInfoValidationException,
MissingDnaContainerException,
MissingCPTableException
FieldInfoValidationException
MissingDnaContainerException
MissingCPTableException
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone() method will return a new instance whose reference to the
containing Dna is not modified.
clone in interface InfoStructureclone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||