jef.dna.constantPoolTable.impl
Class CPTableFactory

java.lang.Object
  extended by jef.dna.constantPoolTable.impl.CPTableFactory
All Implemented Interfaces:
ConstantPoolTableFactory

public class CPTableFactory
extends java.lang.Object
implements ConstantPoolTableFactory

This class is a concrete implementation of the interface.

Author:
Francesco Russo (frusso@cs.unibo.it)

Field Summary
protected static Logger logger
           
 
Constructor Summary
CPTableFactory()
          Creates a new instance of CPTableFactory
 
Method Summary
 ConstantPoolTable getInstance()
          Returns an empty instance of the ConstantPoolTable interface
 ConstantPoolTable getInstance(java.io.DataInputStream dis, Dna dna, int cptSize)
          Returns a populated instance of the ConstantPoolTable interface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static Logger logger
Constructor Detail

CPTableFactory

public CPTableFactory()
Creates a new instance of CPTableFactory

Method Detail

getInstance

public ConstantPoolTable getInstance()
Returns an empty instance of the ConstantPoolTable interface

Specified by:
getInstance in interface ConstantPoolTableFactory
Returns:
ConstantPoolTable The implementation instance

getInstance

public ConstantPoolTable getInstance(java.io.DataInputStream dis,
                                     Dna dna,
                                     int cptSize)
                              throws MissingDnaContainerException,
                                     DnaDeserializationException
Returns a populated instance of the ConstantPoolTable interface

Specified by:
getInstance in interface ConstantPoolTableFactory
Parameters:
dis - The input stream the constant pool table has to be read from
dna - The Dna container
cptSize - The number of expected constant pool table entries
Returns:
ConstantPoolTable The implementation instance
Throws:
MissingDnaContainerException
DnaDeserializationException