org.aspectj.org.eclipse.jdt.internal.core.util
Class ConstantPoolEntry

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.core.util.ConstantPoolEntry
All Implemented Interfaces:
IConstantPoolEntry

public class ConstantPoolEntry
extends java.lang.Object
implements IConstantPoolEntry

Default implementation of IConstantPoolEntry

Since:
2.0

Constructor Summary
ConstantPoolEntry()
           
 
Method Summary
 int getClassIndex()
          Returns the class index for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry.
 char[] getClassInfoName()
          Returns the class name for a CONSTANT_Class type entry.
 int getClassInfoNameIndex()
          Returns the name index for a CONSTANT_Class type entry.
 char[] getClassName()
          Returns the class name for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry.
 double getDoubleValue()
          Returns the double value for a CONSTANT_Double type entry.
 char[] getFieldDescriptor()
          Returns the field descriptor value for a CONSTANT_Fieldref type entry.
 char[] getFieldName()
          Returns the field name for a CONSTANT_Fieldref type entry.
 float getFloatValue()
          Returns the float value for a CONSTANT_Float type entry.
 int getIntegerValue()
          Returns the integer value for a CONSTANT_Integer type entry.
 int getKind()
          Returns the type of this entry.
 long getLongValue()
          Returns the long value for a CONSTANT_Long type entry.
 char[] getMethodDescriptor()
          Returns the method descriptor value for a CONSTANT_Methodref or CONSTANT_InterfaceMethodref type entry.
 char[] getMethodName()
          Returns the field name for a CONSTANT_Methodref or CONSTANT_InterfaceMethodred type entry.
 int getNameAndTypeDescriptorIndex()
          Gets the nameAndTypeDescriptorIndex.
 int getNameAndTypeIndex()
          Returns the nameAndType index for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry.
 int getNameAndTypeInfoDescriptorIndex()
          Returns the descriptor index for a CONSTANT_NameAndType type entry.
 int getNameAndTypeInfoNameIndex()
          Returns the name index for a CONSTANT_NameAndType type entry.
 int getNameAndTypeNameIndex()
          Gets the nameAndTypeNameIndex.
 int getStringIndex()
          Returns the string index for a CONSTANT_String type entry.
 java.lang.String getStringValue()
          Returns the string value for a CONSTANT_String type entry.
 int getUtf8Length()
          Returns the utf8 length for a CONSTANT_Utf8 type entry.
 char[] getUtf8Value()
          Returns the utf8 value for a CONSTANT_Utf8 type entry.
 void reset()
           
 void setClassIndex(int classIndex)
          Sets the classIndex.
 void setClassInfoName(char[] classInfoName)
          Sets the classInfoName.
 void setClassInfoNameIndex(int classInfoNameIndex)
          Sets the classInfoNameIndex.
 void setClassName(char[] className)
          Sets the className.
 void setDoubleValue(double doubleValue)
          Sets the doubleValue.
 void setFieldDescriptor(char[] fieldDescriptor)
          Sets the fieldDescriptor.
 void setFieldName(char[] fieldName)
          Sets the fieldName.
 void setFloatValue(float floatValue)
          Sets the floatValue.
 void setIntegerValue(int integerValue)
          Sets the integerValue.
 void setKind(int kind)
          Sets the kind.
 void setLongValue(long longValue)
          Sets the longValue.
 void setMethodDescriptor(char[] methodDescriptor)
          Sets the methodDescriptor.
 void setMethodName(char[] methodName)
          Sets the methodName.
 void setNameAndTypeDescriptorIndex(int nameAndTypeDescriptorIndex)
          Sets the nameAndTypeDescriptorIndex.
 void setNameAndTypeIndex(int nameAndTypeIndex)
          Sets the nameAndTypeIndex.
 void setNameAndTypeNameIndex(int nameAndTypeNameIndex)
          Sets the nameAndTypeNameIndex.
 void setStringIndex(int stringIndex)
          Sets the stringIndex.
 void setStringValue(char[] stringValue)
          Sets the stringValue.
 void setUtf8Length(int utf8Length)
          Sets the utf8Length.
 void setUtf8Value(char[] utf8Value)
          Sets the utf8Value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantPoolEntry

public ConstantPoolEntry()
Method Detail

getKind

public int getKind()
Description copied from interface: IConstantPoolEntry
Returns the type of this entry.

Specified by:
getKind in interface IConstantPoolEntry
Returns:
the type of this entry
See Also:
IConstantPoolEntry.getKind()

setKind

public void setKind(int kind)
Sets the kind.

Parameters:
kind - The kind to set

getClassInfoNameIndex

public int getClassInfoNameIndex()
Description copied from interface: IConstantPoolEntry
Returns the name index for a CONSTANT_Class type entry. The value is unspecified otherwise.

Specified by:
getClassInfoNameIndex in interface IConstantPoolEntry
Returns:
the name index for a CONSTANT_Class type entry
See Also:
IConstantPoolEntry.getClassInfoNameIndex()

getClassIndex

public int getClassIndex()
Description copied from interface: IConstantPoolEntry
Returns the class index for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry. The value is unspecified otherwise.

Specified by:
getClassIndex in interface IConstantPoolEntry
Returns:
the class index for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry
See Also:
IConstantPoolEntry.getClassIndex()

getNameAndTypeIndex

public int getNameAndTypeIndex()
Description copied from interface: IConstantPoolEntry
Returns the nameAndType index for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry. The value is unspecified otherwise.

Specified by:
getNameAndTypeIndex in interface IConstantPoolEntry
Returns:
the nameAndType index for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry
See Also:
IConstantPoolEntry.getNameAndTypeIndex()

getStringIndex

public int getStringIndex()
Description copied from interface: IConstantPoolEntry
Returns the string index for a CONSTANT_String type entry. The value is unspecified otherwise.

Specified by:
getStringIndex in interface IConstantPoolEntry
Returns:
the string index for a CONSTANT_String type entry
See Also:
IConstantPoolEntry.getStringIndex()

getStringValue

public java.lang.String getStringValue()
Description copied from interface: IConstantPoolEntry
Returns the string value for a CONSTANT_String type entry. Returns null otherwise.

Specified by:
getStringValue in interface IConstantPoolEntry
Returns:
the string value for a CONSTANT_String type entry
See Also:
IConstantPoolEntry.getStringValue()

getIntegerValue

public int getIntegerValue()
Description copied from interface: IConstantPoolEntry
Returns the integer value for a CONSTANT_Integer type entry. The value is unspecified otherwise.

Specified by:
getIntegerValue in interface IConstantPoolEntry
Returns:
the integer value for a CONSTANT_Integer type entry
See Also:
IConstantPoolEntry.getIntegerValue()

getFloatValue

public float getFloatValue()
Description copied from interface: IConstantPoolEntry
Returns the float value for a CONSTANT_Float type entry. The value is unspecified otherwise.

Specified by:
getFloatValue in interface IConstantPoolEntry
Returns:
the float value for a CONSTANT_Float type entry
See Also:
IConstantPoolEntry.getFloatValue()

getDoubleValue

public double getDoubleValue()
Description copied from interface: IConstantPoolEntry
Returns the double value for a CONSTANT_Double type entry. The value is unspecified otherwise.

Specified by:
getDoubleValue in interface IConstantPoolEntry
Returns:
the double value for a CONSTANT_Double type entry
See Also:
IConstantPoolEntry.getDoubleValue()

getLongValue

public long getLongValue()
Description copied from interface: IConstantPoolEntry
Returns the long value for a CONSTANT_Long type entry. The value is unspecified otherwise.

Specified by:
getLongValue in interface IConstantPoolEntry
Returns:
the long value for a CONSTANT_Long type entry
See Also:
IConstantPoolEntry.getLongValue()

getNameAndTypeInfoDescriptorIndex

public int getNameAndTypeInfoDescriptorIndex()
Description copied from interface: IConstantPoolEntry
Returns the descriptor index for a CONSTANT_NameAndType type entry. The value is unspecified otherwise.

Specified by:
getNameAndTypeInfoDescriptorIndex in interface IConstantPoolEntry
Returns:
the descriptor index for a CONSTANT_NameAndType type entry
See Also:
IConstantPoolEntry.getNameAndTypeInfoDescriptorIndex()

getNameAndTypeInfoNameIndex

public int getNameAndTypeInfoNameIndex()
Description copied from interface: IConstantPoolEntry
Returns the name index for a CONSTANT_NameAndType type entry. The value is unspecified otherwise.

Specified by:
getNameAndTypeInfoNameIndex in interface IConstantPoolEntry
Returns:
the name index for a CONSTANT_NameAndType type entry
See Also:
IConstantPoolEntry.getNameAndTypeInfoNameIndex()

getClassName

public char[] getClassName()
Description copied from interface: IConstantPoolEntry
Returns the class name for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry. Returns null otherwise.

Specified by:
getClassName in interface IConstantPoolEntry
Returns:
the class name for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry
See Also:
IConstantPoolEntry.getClassName()

getFieldName

public char[] getFieldName()
Description copied from interface: IConstantPoolEntry
Returns the field name for a CONSTANT_Fieldref type entry. Returns null otherwise.

Specified by:
getFieldName in interface IConstantPoolEntry
Returns:
the field name for a CONSTANT_Fieldref type entry
See Also:
IConstantPoolEntry.getFieldName()

getMethodName

public char[] getMethodName()
Description copied from interface: IConstantPoolEntry
Returns the field name for a CONSTANT_Methodref or CONSTANT_InterfaceMethodred type entry. Returns null otherwise.

Specified by:
getMethodName in interface IConstantPoolEntry
Returns:
the field name for a CONSTANT_Methodref or CONSTANT_InterfaceMethodred type entry
See Also:
IConstantPoolEntry.getMethodName()

getFieldDescriptor

public char[] getFieldDescriptor()
Description copied from interface: IConstantPoolEntry
Returns the field descriptor value for a CONSTANT_Fieldref type entry. This value is set only when decoding the CONSTANT_Fieldref entry. Returns null otherwise.

Specified by:
getFieldDescriptor in interface IConstantPoolEntry
Returns:
the field descriptor value for a CONSTANT_Fieldref type entry. This value is set only when decoding the CONSTANT_Fieldref entry
See Also:
IConstantPoolEntry.getFieldDescriptor()

getMethodDescriptor

public char[] getMethodDescriptor()
Description copied from interface: IConstantPoolEntry
Returns the method descriptor value for a CONSTANT_Methodref or CONSTANT_InterfaceMethodref type entry. This value is set only when decoding the CONSTANT_Methodref or CONSTANT_InterfaceMethodref entry. Returns null otherwise.

Specified by:
getMethodDescriptor in interface IConstantPoolEntry
Returns:
the method descriptor value for a CONSTANT_Methodref or CONSTANT_InterfaceMethodref type entry. This value is set only when decoding the CONSTANT_Methodref or CONSTANT_InterfaceMethodref entry
See Also:
IConstantPoolEntry.getMethodDescriptor()

getUtf8Value

public char[] getUtf8Value()
Description copied from interface: IConstantPoolEntry
Returns the utf8 value for a CONSTANT_Utf8 type entry. This value is set only when decoding a UTF8 entry. Returns null otherwise.

Specified by:
getUtf8Value in interface IConstantPoolEntry
Returns:
the utf8 value for a CONSTANT_Utf8 type entry. This value is set only when decoding a UTF8 entry
See Also:
IConstantPoolEntry.getUtf8Value()

getClassInfoName

public char[] getClassInfoName()
Description copied from interface: IConstantPoolEntry
Returns the class name for a CONSTANT_Class type entry. Returns null otherwise.

Specified by:
getClassInfoName in interface IConstantPoolEntry
Returns:
the class name for a CONSTANT_Class type entry
See Also:
IConstantPoolEntry.getClassInfoName()

setClassInfoNameIndex

public void setClassInfoNameIndex(int classInfoNameIndex)
Sets the classInfoNameIndex.

Parameters:
classInfoNameIndex - The classInfoNameIndex to set

setClassIndex

public void setClassIndex(int classIndex)
Sets the classIndex.

Parameters:
classIndex - The classIndex to set

setNameAndTypeIndex

public void setNameAndTypeIndex(int nameAndTypeIndex)
Sets the nameAndTypeIndex.

Parameters:
nameAndTypeIndex - The nameAndTypeIndex to set

setStringIndex

public void setStringIndex(int stringIndex)
Sets the stringIndex.

Parameters:
stringIndex - The stringIndex to set

setStringValue

public void setStringValue(char[] stringValue)
Sets the stringValue.

Parameters:
stringValue - The stringValue to set

setIntegerValue

public void setIntegerValue(int integerValue)
Sets the integerValue.

Parameters:
integerValue - The integerValue to set

setFloatValue

public void setFloatValue(float floatValue)
Sets the floatValue.

Parameters:
floatValue - The floatValue to set

setDoubleValue

public void setDoubleValue(double doubleValue)
Sets the doubleValue.

Parameters:
doubleValue - The doubleValue to set

setLongValue

public void setLongValue(long longValue)
Sets the longValue.

Parameters:
longValue - The longValue to set

getNameAndTypeDescriptorIndex

public int getNameAndTypeDescriptorIndex()
Gets the nameAndTypeDescriptorIndex.

Returns:
Returns a int

setNameAndTypeDescriptorIndex

public void setNameAndTypeDescriptorIndex(int nameAndTypeDescriptorIndex)
Sets the nameAndTypeDescriptorIndex.

Parameters:
nameAndTypeDescriptorIndex - The nameAndTypeDescriptorIndex to set

getNameAndTypeNameIndex

public int getNameAndTypeNameIndex()
Gets the nameAndTypeNameIndex.

Returns:
Returns a int

setNameAndTypeNameIndex

public void setNameAndTypeNameIndex(int nameAndTypeNameIndex)
Sets the nameAndTypeNameIndex.

Parameters:
nameAndTypeNameIndex - The nameAndTypeNameIndex to set

setClassName

public void setClassName(char[] className)
Sets the className.

Parameters:
className - The className to set

setFieldName

public void setFieldName(char[] fieldName)
Sets the fieldName.

Parameters:
fieldName - The fieldName to set

setMethodName

public void setMethodName(char[] methodName)
Sets the methodName.

Parameters:
methodName - The methodName to set

setFieldDescriptor

public void setFieldDescriptor(char[] fieldDescriptor)
Sets the fieldDescriptor.

Parameters:
fieldDescriptor - The fieldDescriptor to set

setMethodDescriptor

public void setMethodDescriptor(char[] methodDescriptor)
Sets the methodDescriptor.

Parameters:
methodDescriptor - The methodDescriptor to set

setUtf8Value

public void setUtf8Value(char[] utf8Value)
Sets the utf8Value.

Parameters:
utf8Value - The utf8Value to set

setClassInfoName

public void setClassInfoName(char[] classInfoName)
Sets the classInfoName.

Parameters:
classInfoName - The classInfoName to set

getUtf8Length

public int getUtf8Length()
Description copied from interface: IConstantPoolEntry
Returns the utf8 length for a CONSTANT_Utf8 type entry. This value is set only when decoding a UTF8 entry. Returns null otherwise.

Specified by:
getUtf8Length in interface IConstantPoolEntry
Returns:
the utf8 length for a CONSTANT_Utf8 type entry. This value is set only when decoding a UTF8 entry
See Also:
IConstantPoolEntry.getUtf8Length()

setUtf8Length

public void setUtf8Length(int utf8Length)
Sets the utf8Length.

Parameters:
utf8Length - The utf8Length to set

reset

public void reset()