|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjef.dna.attributes.impl.GenericAttribute
jef.dna.attributes.impl.ConstantValue
public class ConstantValue
| Field Summary | |
|---|---|
protected static Logger |
logger
|
| Fields inherited from class jef.dna.attributes.impl.GenericAttribute |
|---|
attribFactory, attributeNameIndex, dna, instrFactory |
| Constructor Summary | |
|---|---|
ConstantValue()
Constructor. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
The clone() method will return a new instance whose reference to the
containing Dna instance is set to null. |
void |
fromStream(java.io.DataInputStream dis,
Dna dna,
int index,
int length)
This method reads the data with which the attribute has to be initialized. |
int |
getBytesCount()
This method must return the overall number of bytes required by the component implementing this interface. |
int |
getValue()
This method gets the constantvalue_index of the current
ConstantValueAttribute. |
protected void |
innerValidations(ConstantPoolTable cpt)
|
void |
setValue(int value)
This method sets the constantvalue_index of the current
ConstantValueAttribute. |
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. |
| Methods inherited from class jef.dna.attributes.impl.GenericAttribute |
|---|
getDna, getLength, getNameIndex, setDna, setNameIndex, validate, validateNameIndex |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jef.dna.attributes.Attribute |
|---|
getDna, getLength, getNameIndex, setDna, setNameIndex, validate |
| Field Detail |
|---|
protected static Logger logger
| Constructor Detail |
|---|
public ConstantValue()
| Method Detail |
|---|
public void setValue(int value)
ConstantValueAttributeconstantvalue_index of the current
ConstantValueAttribute. The provided index has to be a valid index into the constant pool
table. The entry at that index gives the constant value represented by this attribute.
setValue in interface ConstantValueAttributeconstantValueIndex - public int getValue()
ConstantValueAttributeconstantvalue_index of the current
ConstantValueAttribute. This index will be a valid index into the constant pool table. The
entry at that index gives the constant value represented by this attribute.
getValue in interface ConstantValueAttribute
public void toStream(java.io.DataOutputStream dos)
throws DnaSerializationException
Attribute
toStream in interface Attributedos -
DnaSerializationException
public void fromStream(java.io.DataInputStream dis,
Dna dna,
int index,
int length)
throws DnaDeserializationException,
MissingDnaContainerException
Attribute
fromStream in interface Attributedis - dna - index - length -
DnaDeserializationException
MissingDnaContainerExceptionpublic void updateRefs(int offset)
Attribute
updateRefs in interface AttributeupdateRefs in class GenericAttributeoffset -
protected void innerValidations(ConstantPoolTable cpt)
throws AttributeValidationException,
AttributeOutOfRangeException,
MissingDnaContainerException,
MissingCPTableException
innerValidations in class GenericAttributecpt -
AttributeValidationException
AttributeOutOfRangeException
MissingDnaContainerException
MissingCPTableException
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
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 constantValueIndex.
clone in interface Attributeclone in class GenericAttributejava.lang.CloneNotSupportedExceptionpublic int getBytesCount()
BytesCountable
getBytesCount in interface BytesCountable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||