jef.dna.constantInfo.impl
Class ConstantString
java.lang.Object
jef.dna.constantInfo.impl.ConstantAncestor
jef.dna.constantInfo.impl.ConstantString
- All Implemented Interfaces:
- java.lang.Cloneable, ConstantInfo, ConstString
public class ConstantString
- extends ConstantAncestor
- implements ConstString
Field Summary |
protected static java.lang.String |
className
|
protected static Logger |
logger
|
protected java.lang.String |
type
|
Method Summary |
java.lang.Object |
clone()
The clone() method will return a new instance whose reference to the
containing ConstantPoolTable instance is set to null . |
void |
fromStream(java.io.DataInputStream dis)
This method does not perform anything. |
int |
getStringIndex()
The value of the string_index item must be a valid index into the constant_pool table. |
protected void |
innerValidations(ConstantPoolTable cpt)
|
void |
setStringIndex(int index)
The value of the string_index item must be a valid index into the constant_pool table. |
void |
toStream(java.io.DataOutputStream dos)
This method does not perform anything. |
void |
updateRefs(int offset)
This method does not perform anything. |
protected void |
validateStringIndex(ConstantPoolTable cpt)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
type
protected java.lang.String type
className
protected static java.lang.String className
logger
protected static Logger logger
ConstantString
public ConstantString()
getStringIndex
public int getStringIndex()
- Description copied from interface:
ConstString
- The value of the string_index item must be a valid index into the constant_pool table. The
constant_pool entry at that index must be a CONSTANT_Utf8_info The value of the string_index
item must be a valid index into the constant_pool table. The constant_pool entry at that
index must be a CONSTANT_Utf8_info.
- Specified by:
getStringIndex
in interface ConstString
- Returns:
- int The index of the CONSTANT_Utf8_info structure
setStringIndex
public void setStringIndex(int index)
- Description copied from interface:
ConstString
- The value of the string_index item must be a valid index into the constant_pool table. The
constant_pool entry at that index must be a CONSTANT_Utf8_info The value of the string_index
item must be a valid index into the constant_pool table. The constant_pool entry at that
index must be a CONSTANT_Utf8_info.
- Specified by:
setStringIndex
in interface ConstString
- Parameters:
index
- The index of the CONSTANT_Utf8_info structure
toStream
public void toStream(java.io.DataOutputStream dos)
throws DnaSerializationException
- Description copied from class:
ConstantAncestor
- This method does not perform anything. Implementation subclasses have to provide their own
implementation.
- Specified by:
toStream
in interface ConstantInfo
- Specified by:
toStream
in class ConstantAncestor
- Parameters:
dos
- The DataOutputStream
to write the object to
- Throws:
DnaSerializationException
fromStream
public void fromStream(java.io.DataInputStream dis)
throws DnaDeserializationException
- Description copied from class:
ConstantAncestor
- This method does not perform anything. Implementation subclasses have to provide their own
implementation.
- Specified by:
fromStream
in interface ConstantInfo
- Specified by:
fromStream
in class ConstantAncestor
- Parameters:
dis
- The DataInputStream
for reading the Constant Info fields
- Throws:
DnaDeserializationException
updateRefs
public void updateRefs(int offset)
- Description copied from class:
ConstantAncestor
- This method does not perform anything. Implementation subclasses have to provide their own
implementation.
- Specified by:
updateRefs
in interface ConstantInfo
- Overrides:
updateRefs
in class ConstantAncestor
- Parameters:
offset
- The offset to be applied
innerValidations
protected void innerValidations(ConstantPoolTable cpt)
throws ConstantInfoValidationException,
ConstantInfoAttributeOutOfRangeException
- Specified by:
innerValidations
in class ConstantAncestor
- Throws:
ConstantInfoValidationException
ConstantInfoAttributeOutOfRangeException
validateStringIndex
protected void validateStringIndex(ConstantPoolTable cpt)
throws ConstantInfoValidationException,
ConstantInfoAttributeOutOfRangeException
- Throws:
ConstantInfoValidationException
ConstantInfoAttributeOutOfRangeException
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- The
clone()
method will return a new instance whose reference to the
containing ConstantPoolTable
instance is set to null
. It is up
to you appropriately setting it to the correct value.
- Specified by:
clone
in interface ConstantInfo
- Overrides:
clone
in class ConstantAncestor
- Returns:
- The clone
- Throws:
java.lang.CloneNotSupportedException