|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Attribute
This is the ancestor of all the interfaces implemented by those classes representing the
Attributes
entities.
Method Summary | |
---|---|
java.lang.Object |
clone()
|
void |
fromStream(java.io.DataInputStream dis,
Dna dna,
int nameIndex,
int length)
This method reads the data with which the attribute has to be initialized. |
Dna |
getDna()
Get the Dna instance which will contain the current Attribute |
int |
getLength()
Returns the length expressed in bytes of the attribute's payload. |
int |
getNameIndex()
Returns the attribute's name index, |
void |
setDna(Dna dna)
Set the Dna instance which will contain the current Attribute |
void |
setNameIndex(int index)
Set a valid index into the constant pool table. |
void |
toStream(java.io.DataOutputStream dos)
This method writes the attribute to the provided output stream. |
void |
updateRefs(int offset)
This method updates all the references pointing to constant pool table's entries this attributes holds. |
boolean |
validate()
This method has to perform a validation process over the Attribute according
to what specified by the JVM Official Specification. |
Methods inherited from interface jef.dna.util.BytesCountable |
---|
getBytesCount |
Method Detail |
---|
void setNameIndex(int index)
Code
attribute, the constant pool table entry at the
provided index would be of type ConstantUtf8, with the string Code
as value.
index
- A valid index in the constant pool tableint getNameIndex()
int getLength()
void updateRefs(int offset)
offset
- The offsetvoid setDna(Dna dna)
Dna
instance which will contain the current Attribute
dna
- The "container" Dna
Dna getDna()
Dna
instance which will contain the current Attribute
Dna
boolean validate() throws AttributeValidationException, AttributeOutOfRangeException, MissingDnaContainerException, MissingCPTableException
Attribute
according
to what specified by the JVM Official Specification.
AttributeValidationException
- Something failed with the validation process; further information are stored
within the raised exception
AttributeOutOfRangeException
- Something failed with the validation process; further information are stored
within the raised exception
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
instancevoid fromStream(java.io.DataInputStream dis, Dna dna, int nameIndex, int length) throws DnaDeserializationException, MissingDnaContainerException
dis
- The input streamdna
- The Dna
instance this class belongs tonameIndex
- The value of the name indexlength
- The length of the attribute
DnaDeserializationException
- Errors while reading the attribute from the stream
MissingDnaContainerException
- There is no reference to the current Dna
containervoid toStream(java.io.DataOutputStream dos) throws DnaSerializationException
dos
- The output stream
DnaSerializationException
- Errors while writing the attribute to the output streamjava.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |