jef.dna.constantInfo.impl
Class ConstantInfoFactory

java.lang.Object
  extended by jef.dna.constantInfo.impl.ConstantInfoFactory
All Implemented Interfaces:
ConstInfoFactory

public class ConstantInfoFactory
extends java.lang.Object
implements ConstInfoFactory

Class used for instantiating ConstantInfo objects.

Author:
frusso

Field Summary
static int CONSTANT_Class
           
static int CONSTANT_Double
           
static int CONSTANT_Fieldref
           
static int CONSTANT_Float
           
static int CONSTANT_Integer
           
static int CONSTANT_InterfaceMethodref
           
static int CONSTANT_Long
           
static int CONSTANT_Methodref
           
static int CONSTANT_NameAndType
           
static int CONSTANT_String
           
static int CONSTANT_Unusable_Entry
           
static int CONSTANT_Utf8
           
 
Constructor Summary
ConstantInfoFactory()
           
 
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)
          This method returns ConstantInfo compliant objects.
 ConstantInfo getInstance(int tag, java.io.DataInputStream dis)
          This method returns ConstantInfo compliant objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONSTANT_Class

public static final int CONSTANT_Class
See Also:
Constant Field Values

CONSTANT_Fieldref

public static final int CONSTANT_Fieldref
See Also:
Constant Field Values

CONSTANT_Methodref

public static final int CONSTANT_Methodref
See Also:
Constant Field Values

CONSTANT_InterfaceMethodref

public static final int CONSTANT_InterfaceMethodref
See Also:
Constant Field Values

CONSTANT_String

public static final int CONSTANT_String
See Also:
Constant Field Values

CONSTANT_Integer

public static final int CONSTANT_Integer
See Also:
Constant Field Values

CONSTANT_Float

public static final int CONSTANT_Float
See Also:
Constant Field Values

CONSTANT_Long

public static final int CONSTANT_Long
See Also:
Constant Field Values

CONSTANT_Double

public static final int CONSTANT_Double
See Also:
Constant Field Values

CONSTANT_NameAndType

public static final int CONSTANT_NameAndType
See Also:
Constant Field Values

CONSTANT_Utf8

public static final int CONSTANT_Utf8
See Also:
Constant Field Values

CONSTANT_Unusable_Entry

public static final int CONSTANT_Unusable_Entry
See Also:
Constant Field Values
Constructor Detail

ConstantInfoFactory

public ConstantInfoFactory()
Method Detail

getInstance

public ConstantInfo getInstance(int tag,
                                java.io.DataInputStream dis)
                         throws DnaDeserializationException,
                                UnknownConstantPoolTableEntryException
This method returns ConstantInfo compliant objects.

Specified by:
getInstance in interface ConstInfoFactory
Parameters:
tag - The tag defining the type of the required ConstantInfo object
dis - The DataInputStream the ConstantInfo has to be read from
Throws:
DnaDeserializationException
UnknownConstantPoolTableEntryException

getInstance

public ConstantInfo getInstance(int tag)
                         throws DnaDeserializationException,
                                UnknownConstantPoolTableEntryException
This method returns ConstantInfo compliant objects.

Specified by:
getInstance in interface ConstInfoFactory
Parameters:
tag - The tag defining the type of the required ConstantInfo object
Throws:
DnaDeserializationException
UnknownConstantPoolTableEntryException

getInstance

public ConstantInfo getInstance(java.io.DataInputStream dis)
                         throws DnaDeserializationException,
                                UnknownConstantPoolTableEntryException
Description copied from interface: ConstInfoFactory
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.

Specified by:
getInstance in interface ConstInfoFactory
Parameters:
dis - The input stream opened over the Java class file
Returns:
ConstantInfo a valid constantInfo instance
Throws:
DnaDeserializationException
UnknownConstantPoolTableEntryException

getInstance

public ConstantInfo getInstance(java.io.DataInputStream dis,
                                Dna dna)
                         throws DnaDeserializationException,
                                UnknownConstantPoolTableEntryException
Description copied from interface: ConstInfoFactory
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.

Specified by:
getInstance in interface ConstInfoFactory
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