ProGuard

proguard.classfile
Class CpInfo

java.lang.Object
  extended byproguard.classfile.CpInfo
All Implemented Interfaces:
VisitorAccepter
Direct Known Subclasses:
ClassCpInfo, DoubleCpInfo, FloatCpInfo, IntegerCpInfo, LongCpInfo, NameAndTypeCpInfo, RefCpInfo, StringCpInfo, Utf8CpInfo

public abstract class CpInfo
extends Object
implements VisitorAccepter

Representation of an entry in the ConstantPool. Specific types of entry have their representations sub-classed from this.


Field Summary
 Object visitorInfo
          An extra field in which visitors can store information.
 
Constructor Summary
CpInfo()
           
 
Method Summary
abstract  void accept(ClassFile classFile, CpInfoVisitor cpInfoVisitor)
          Accepts the given visitor.
static CpInfo create(DataInput din)
          Creates a new CpInfo from the data passed.
static CpInfo createOrShare(DataInput din)
          Creates a new CpInfo from the data passed, for UTF-8 and Class constant pool entries, or returns a shared object, for all other entries.
abstract  int getTag()
          Returns the class pool info tag that specifies the entry type.
 Object getVisitorInfo()
          Gets the visitor information of the visitor accepter.
protected abstract  void readInfo(DataInput din)
          Reads the 'info' data following the u1tag byte.
 void setVisitorInfo(Object visitorInfo)
          Sets the visitor information of the visitor accepter.
 void write(DataOutput dout)
          Exports the representation to a DataOutput stream.
protected abstract  void writeInfo(DataOutput dout)
          Writes the 'info' data following the u1tag byte.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

visitorInfo

public Object visitorInfo
An extra field in which visitors can store information.

Constructor Detail

CpInfo

public CpInfo()
Method Detail

create

public static CpInfo create(DataInput din)
                     throws IOException
Creates a new CpInfo from the data passed.

Throws:
IOException - if the class file is corrupt or incomplete.

createOrShare

public static CpInfo createOrShare(DataInput din)
                            throws IOException
Creates a new CpInfo from the data passed, for UTF-8 and Class constant pool entries, or returns a shared object, for all other entries.

Throws:
IOException - if the class file is corrupt or incomplete.

write

public void write(DataOutput dout)
           throws IOException
Exports the representation to a DataOutput stream.

Throws:
IOException

getTag

public abstract int getTag()
Returns the class pool info tag that specifies the entry type.


readInfo

protected abstract void readInfo(DataInput din)
                          throws IOException
Reads the 'info' data following the u1tag byte.

Throws:
IOException

writeInfo

protected abstract void writeInfo(DataOutput dout)
                           throws IOException
Writes the 'info' data following the u1tag byte.

Throws:
IOException

accept

public abstract void accept(ClassFile classFile,
                            CpInfoVisitor cpInfoVisitor)
Accepts the given visitor.


getVisitorInfo

public Object getVisitorInfo()
Description copied from interface: VisitorAccepter
Gets the visitor information of the visitor accepter.

Specified by:
getVisitorInfo in interface VisitorAccepter

setVisitorInfo

public void setVisitorInfo(Object visitorInfo)
Description copied from interface: VisitorAccepter
Sets the visitor information of the visitor accepter.

Specified by:
setVisitorInfo in interface VisitorAccepter

ProGuard