jef.dna.constantInfo
Interface ConstInfoFactory

All Known Implementing Classes:
ConstantInfoFactory

public interface ConstInfoFactory

This interface defines the methods every factory implementation class meant for instantiating ConstantInfo objects has to provide.

Author:
Francesco Russo frusso@cs.unibo.it

Field Summary
static int CONSTANT_Class
          Tag identifying a CONSTANT_Class
static int CONSTANT_Double
          Tag identifying a CONSTANT_Double
static int CONSTANT_Fieldref
          Tag identifying a CONSTANT_Fieldref
static int CONSTANT_Float
          Tag identifying a CONSTANT_Float
static int CONSTANT_Integer
          Tag identifying a CONSTANT_Integer
static int CONSTANT_InterfaceMethodref
          Tag identifying a CONSTANT_InterfaceMethodref
static int CONSTANT_Long
          Tag identifying a CONSTANT_Long
static int CONSTANT_Methodref
          Tag identifying a CONSTANT_Methodref
static int CONSTANT_NameAndType
          Tag identifying a CONSTANT_NameAndType
static int CONSTANT_String
          Tag identifying a CONSTANT_String
static int CONSTANT_Unusable_Entry
          Tag identifying an unusable constant pool table entry
static int CONSTANT_Utf8
          Tag identifying a CONSTANT_Utf8
 
Method Summary
 ConstantInfo getInstance(java.io.DataInputStream dis)
          This method returns a velid constantInfo instance iff the provided input stream contains at the current position a legal constantInfo identifier (or tag), followed by all the necessary information as defined by the Java VM Specification chapter 4.
 ConstantInfo getInstance(java.io.DataInputStream dis, Dna dna)
          This method returns a velid constantInfo instance iff the provided input stream contains at the current position a legal constantInfo identifier (or tag), followed by all the necessary information as defined by the Java VM Specification chapter 4.
 ConstantInfo getInstance(int tag)
          The returned instance belongs to the type defined by the provided tag.
 ConstantInfo getInstance(int tag, java.io.DataInputStream dis)
          The returned instance belongs to the type defined by the provided tag.
 

Field Detail

CONSTANT_Class

static final int CONSTANT_Class
Tag identifying a CONSTANT_Class

See Also:
Constant Field Values

CONSTANT_Fieldref

static final int CONSTANT_Fieldref
Tag identifying a CONSTANT_Fieldref

See Also:
Constant Field Values

CONSTANT_Methodref

static final int CONSTANT_Methodref
Tag identifying a CONSTANT_Methodref

See Also:
Constant Field Values

CONSTANT_InterfaceMethodref

static final int CONSTANT_InterfaceMethodref
Tag identifying a CONSTANT_InterfaceMethodref

See Also:
Constant Field Values

CONSTANT_String

static final int CONSTANT_String
Tag identifying a CONSTANT_String

See Also:
Constant Field Values

CONSTANT_Integer

static final int CONSTANT_Integer
Tag identifying a CONSTANT_Integer

See Also:
Constant Field Values

CONSTANT_Float

static final int CONSTANT_Float
Tag identifying a CONSTANT_Float

See Also:
Constant Field Values

CONSTANT_Long

static final int CONSTANT_Long
Tag identifying a CONSTANT_Long

See Also:
Constant Field Values

CONSTANT_Double

static final int CONSTANT_Double
Tag identifying a CONSTANT_Double

See Also:
Constant Field Values

CONSTANT_NameAndType

static final int CONSTANT_NameAndType
Tag identifying a CONSTANT_NameAndType

See Also:
Constant Field Values

CONSTANT_Utf8

static final int CONSTANT_Utf8
Tag identifying a CONSTANT_Utf8

See Also:
Constant Field Values

CONSTANT_Unusable_Entry

static final int CONSTANT_Unusable_Entry
Tag identifying an unusable constant pool table entry

See Also:
Constant Field Values
Method Detail

getInstance

ConstantInfo getInstance(java.io.DataInputStream dis,
                         Dna dna)
                         throws DnaDeserializationException,
                                UnknownConstantPoolTableEntryException
This method returns a velid constantInfo instance iff the provided input stream contains at the current position a legal constantInfo identifier (or tag), followed by all the necessary information as defined by the Java VM Specification chapter 4.

Parameters:
dis - The input stream opened over the Java class file
dna - The current Dna instance the generated ConstantInfo will belong to
Returns:
ConstantInfo a valid constantInfo instance
Throws:
DnaDeserializationException
UnknownConstantPoolTableEntryException

getInstance

ConstantInfo getInstance(java.io.DataInputStream dis)
                         throws DnaDeserializationException,
                                UnknownConstantPoolTableEntryException
This method returns a velid constantInfo instance iff the provided input stream contains at the current position a legal constantInfo identifier (or tag), followed by all the necessary information as defined by the Java VM Specification chapter 4.

Parameters:
dis - The input stream opened over the Java class file
Returns:
ConstantInfo a valid constantInfo instance
Throws:
DnaDeserializationException
UnknownConstantPoolTableEntryException

getInstance

ConstantInfo getInstance(int tag,
                         java.io.DataInputStream dis)
                         throws DnaDeserializationException,
                                UnknownConstantPoolTableEntryException
The returned instance belongs to the type defined by the provided tag. This ConstantInfo implementation will also be populated using the content available from the provided DataInputStream.

Parameters:
tag - The type of the required ConstantInfo
dis - The stream useful for populating the ConstantInfo
Throws:
DnaDeserializationException
UnknownConstantPoolTableEntryException

getInstance

ConstantInfo getInstance(int tag)
                         throws DnaDeserializationException,
                                UnknownConstantPoolTableEntryException
The returned instance belongs to the type defined by the provided tag. This ConstantInfo implementation won't be populated.

Parameters:
tag - The type of the required ConstantInfo
Throws:
DnaDeserializationException
UnknownConstantPoolTableEntryException