Class ConstantPoolEntry
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.util.ConstantPoolEntry
- All Implemented Interfaces:
IConstantPoolEntry
- Direct Known Subclasses:
ConstantPoolEntry2
Default implementation of IConstantPoolEntry
- Since:
- 2.0
- See Also:
ConstantPoolEntry2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the class index for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry.char[]
Returns the class name for a CONSTANT_Class type entry.int
Returns the name index for a CONSTANT_Class type entry.char[]
Returns the class name for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry.double
Returns the double value for a CONSTANT_Double type entry.char[]
Returns the field descriptor value for a CONSTANT_Fieldref type entry.char[]
Returns the field name for a CONSTANT_Fieldref type entry.float
Returns the float value for a CONSTANT_Float type entry.int
Returns the integer value for a CONSTANT_Integer type entry.int
getKind()
Returns the type of this entry.long
Returns the long value for a CONSTANT_Long type entry.char[]
Returns the method descriptor value for a CONSTANT_Methodref or CONSTANT_InterfaceMethodref type entry.char[]
Returns the method name for a CONSTANT_Methodref, CONSTANT_InterfaceMethodref or CONSTANT_InvokeDynamic type entry.int
Gets the nameAndTypeDescriptorIndex.int
Returns the nameAndType index for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref, CONSTANT_InvokeDynamic type entry.int
Returns the descriptor index for a CONSTANT_NameAndType type entry.int
Returns the name index for a CONSTANT_NameAndType type entry.int
Gets the nameAndTypeNameIndex.int
Returns the string index for a CONSTANT_String type entry.Returns the string value for a CONSTANT_String type entry.int
Returns the utf8 length for a CONSTANT_Utf8 type entry.char[]
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.
-
Constructor Details
-
ConstantPoolEntry
public ConstantPoolEntry()
-
-
Method Details
-
getKind
public int getKind()Description copied from interface:IConstantPoolEntry
Returns the type of this entry.- Specified by:
getKind
in interfaceIConstantPoolEntry
- 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 interfaceIConstantPoolEntry
- 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 interfaceIConstantPoolEntry
- 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, CONSTANT_InvokeDynamic type entry. The value is unspecified otherwise.- Specified by:
getNameAndTypeIndex
in interfaceIConstantPoolEntry
- Returns:
- the nameAndType index for a CONSTANT_Fieldref, CONSTANT_Methodref, CONSTANT_InterfaceMethodref, CONSTANT_InvokeDynamic 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 interfaceIConstantPoolEntry
- Returns:
- the string index for a CONSTANT_String type entry
- See Also:
IConstantPoolEntry.getStringIndex()
-
getStringValue
Description copied from interface:IConstantPoolEntry
Returns the string value for a CONSTANT_String type entry. Returns null otherwise.- Specified by:
getStringValue
in interfaceIConstantPoolEntry
- 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 interfaceIConstantPoolEntry
- 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 interfaceIConstantPoolEntry
- 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 interfaceIConstantPoolEntry
- 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 interfaceIConstantPoolEntry
- 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 interfaceIConstantPoolEntry
- 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 interfaceIConstantPoolEntry
- 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 interfaceIConstantPoolEntry
- 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 interfaceIConstantPoolEntry
- 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 method name for a CONSTANT_Methodref, CONSTANT_InterfaceMethodref or CONSTANT_InvokeDynamic type entry. Returns null otherwise.- Specified by:
getMethodName
in interfaceIConstantPoolEntry
- Returns:
- the method name for a CONSTANT_Methodref, CONSTANT_InterfaceMethodref or CONSTANT_InvokeDynamic 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 interfaceIConstantPoolEntry
- 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, CONSTANT_InterfaceMethodref, CONSTANT_MethodType or CONSTANT_InvokeDynamic entry. Returns null otherwise.- Specified by:
getMethodDescriptor
in interfaceIConstantPoolEntry
- Returns:
- the method descriptor value for a CONSTANT_Methodref, CONSTANT_InterfaceMethodref type entry. This value is set only when decoding the CONSTANT_Methodref, CONSTANT_InterfaceMethodref, CONSTANT_MethodType or CONSTANT_InvokeDynamic 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 interfaceIConstantPoolEntry
- 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 interfaceIConstantPoolEntry
- 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 interfaceIConstantPoolEntry
- 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()
-