fr.umlv.corosol.classfile.constant.impl
Class AbstractJConstant

java.lang.Object
  extended by fr.umlv.corosol.classfile.constant.impl.AbstractJConstant
All Implemented Interfaces:
JConstant, JClassFileItem, JObject
Direct Known Subclasses:
DefaultJConstantClass, DefaultJConstantDouble, DefaultJConstantFieldref, DefaultJConstantFloat, DefaultJConstantInteger, DefaultJConstantInterfaceMethodref, DefaultJConstantLong, DefaultJConstantMethodref, DefaultJConstantNameAndType, DefaultJConstantString, DefaultJConstantUtf8

public abstract class AbstractJConstant
extends java.lang.Object
implements JConstant

The base class of classes implementing a constant pool entry.

Author:
Christophe Deleray

Field Summary
 
Fields inherited from interface fr.umlv.corosol.classfile.constant.JConstant
CONSTANT_CLASS, CONSTANT_DOUBLE, CONSTANT_FIELDREF, CONSTANT_FLOAT, CONSTANT_INTEGER, CONSTANT_INTERFACE_METHODREF, CONSTANT_LONG, CONSTANT_METHODREF, CONSTANT_NAME_AND_TYPE, CONSTANT_STRING, CONSTANT_UTF8
 
Method Summary
 JConstantPool getConstantPool()
          Returns the constant pool of this constant pool entry.
 int getLength()
          Returns the number of entries occupied by this entry in its constant pool.
 int getTag()
          Returns the tag of this constant pool entry.
 void setConstantPool(JConstantPool constantPool)
          Sets the constant pool of this constant pool entry.
abstract  java.lang.String toString()
          Returns a string representation of this constant pool entry.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface fr.umlv.corosol.classfile.JClassFileItem
readItem, writeItem
 

Method Detail

getLength

public int getLength()
Returns the number of entries occupied by this entry in its constant pool.

Specified by:
getLength in interface JConstant
Returns:
the length this entry in its constant pool

getTag

public int getTag()
Returns the tag of this constant pool entry.

Specified by:
getTag in interface JConstant
Returns:
the tag of this constant pool entry

getConstantPool

public JConstantPool getConstantPool()
Returns the constant pool of this constant pool entry.

Specified by:
getConstantPool in interface JClassFileItem

setConstantPool

public void setConstantPool(JConstantPool constantPool)
Sets the constant pool of this constant pool entry.

Specified by:
setConstantPool in interface JClassFileItem
Parameters:
constantPool - the constant Pool

toString

public abstract java.lang.String toString()
Returns a string representation of this constant pool entry.

Specified by:
toString in interface JConstant
Overrides:
toString in class java.lang.Object
Returns:
a string representing this constant pool entry