jef.dna.attributes.impl
Class SourceDebugExtension

java.lang.Object
  extended by jef.dna.attributes.impl.GenericAttribute
      extended by jef.dna.attributes.impl.SourceDebugExtension
All Implemented Interfaces:
java.lang.Cloneable, Attribute, SourceDebugExtensionAttribute, BytesCountable

public class SourceDebugExtension
extends GenericAttribute
implements SourceDebugExtensionAttribute

Author:
frusso

Field Summary
 
Fields inherited from class jef.dna.attributes.impl.GenericAttribute
attribFactory, attributeNameIndex, className, dna, instrFactory, length, logger
 
Constructor Summary
SourceDebugExtension()
          Creates a new instance of SourceDebugExtension
 
Method Summary
 java.lang.Object clone()
          The clone() method will return a new instance whose reference to the containing Dna instance is not modified.
 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.
 int getBytesCount()
          This method must return the overall number of bytes required by the component implementing this interface.
 java.lang.String getDebugExtension()
          Thedebug_extension array holds a string, which must be in UTF-8format.There is no terminating zero byte.
 void setDebugExtension(java.lang.String de)
          Thedebug_extension array holds a string, which must be in UTF-8format.There is no terminating zero byte.
 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, innerValidations, 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
 

Constructor Detail

SourceDebugExtension

public SourceDebugExtension()
Creates a new instance of SourceDebugExtension

Method Detail

updateRefs

public void updateRefs(int offset)
Description copied from interface: Attribute
This method updates all the references pointing to constant pool table's entries this attributes holds.

Specified by:
updateRefs in interface Attribute
Specified by:
updateRefs in class GenericAttribute
Parameters:
offset - The offset

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from class: GenericAttribute
The clone() method will return a new instance whose reference to the containing Dna instance is not modified.

Specified by:
clone in interface Attribute
Overrides:
clone in class GenericAttribute
Throws:
java.lang.CloneNotSupportedException

fromStream

public void fromStream(java.io.DataInputStream dis,
                       Dna dna,
                       int nameIndex,
                       int length)
                throws DnaDeserializationException,
                       MissingDnaContainerException
Description copied from interface: Attribute
This method reads the data with which the attribute has to be initialized.

Specified by:
fromStream in interface Attribute
Parameters:
dis - The input stream
dna - The Dna instance this class belongs to
nameIndex - The value of the name index
length - The length of the attribute
Throws:
DnaDeserializationException - Errors while reading the attribute from the stream
MissingDnaContainerException - There is no reference to the current Dna container

toStream

public void toStream(java.io.DataOutputStream dos)
              throws DnaSerializationException
Description copied from interface: Attribute
This method writes the attribute to the provided output stream.

Specified by:
toStream in interface Attribute
Parameters:
dos - The output stream
Throws:
DnaSerializationException - Errors while writing the attribute to the output stream

getBytesCount

public int getBytesCount()
Description copied from interface: BytesCountable
This method must return the overall number of bytes required by the component implementing this interface.

Specified by:
getBytesCount in interface BytesCountable

getDebugExtension

public java.lang.String getDebugExtension()
Description copied from interface: SourceDebugExtensionAttribute
Thedebug_extension array holds a string, which must be in UTF-8format.There is no terminating zero byte. The string in the debug_extension item will be interpreted as extended debugging information. The content of this string has no semantic effect on the Java Virtual Machine.

Specified by:
getDebugExtension in interface SourceDebugExtensionAttribute

setDebugExtension

public void setDebugExtension(java.lang.String de)
Description copied from interface: SourceDebugExtensionAttribute
Thedebug_extension array holds a string, which must be in UTF-8format.There is no terminating zero byte. The string in the debug_extension item will be interpreted as extended debugging information. The content of this string has no semantic effect on the Java Virtual Machine.

Specified by:
setDebugExtension in interface SourceDebugExtensionAttribute