Package org.objectweb.asm
Class Symbol
- java.lang.Object
-
- org.objectweb.asm.Symbol
-
- Direct Known Subclasses:
SymbolTable.Entry
abstract class Symbol extends java.lang.ObjectAn entry of the constant pool, of the BootstrapMethods attribute, or of the (ASM specific) type table of a class.- See Also:
- JVMS 4.4, JVMS 4.7.23
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static intBOOTSTRAP_METHOD_TAGThe tag value of the BootstrapMethods attribute entries.(package private) static intCONSTANT_CLASS_TAGThe tag value of CONSTANT_Class_info JVMS structures.(package private) static intCONSTANT_DOUBLE_TAGThe tag value of CONSTANT_Double_info JVMS structures.(package private) static intCONSTANT_DYNAMIC_TAGThe tag value of CONSTANT_Dynamic_info JVMS structures.(package private) static intCONSTANT_FIELDREF_TAGThe tag value of CONSTANT_Fieldref_info JVMS structures.(package private) static intCONSTANT_FLOAT_TAGThe tag value of CONSTANT_Float_info JVMS structures.(package private) static intCONSTANT_INTEGER_TAGThe tag value of CONSTANT_Integer_info JVMS structures.(package private) static intCONSTANT_INTERFACE_METHODREF_TAGThe tag value of CONSTANT_InterfaceMethodref_info JVMS structures.(package private) static intCONSTANT_INVOKE_DYNAMIC_TAGThe tag value of CONSTANT_InvokeDynamic_info JVMS structures.(package private) static intCONSTANT_LONG_TAGThe tag value of CONSTANT_Long_info JVMS structures.(package private) static intCONSTANT_METHOD_HANDLE_TAGThe tag value of CONSTANT_MethodHandle_info JVMS structures.(package private) static intCONSTANT_METHOD_TYPE_TAGThe tag value of CONSTANT_MethodType_info JVMS structures.(package private) static intCONSTANT_METHODREF_TAGThe tag value of CONSTANT_Methodref_info JVMS structures.(package private) static intCONSTANT_MODULE_TAGThe tag value of CONSTANT_Module_info JVMS structures.(package private) static intCONSTANT_NAME_AND_TYPE_TAGThe tag value of CONSTANT_NameAndType_info JVMS structures.(package private) static intCONSTANT_PACKAGE_TAGThe tag value of CONSTANT_Package_info JVMS structures.(package private) static intCONSTANT_STRING_TAGThe tag value of CONSTANT_String_info JVMS structures.(package private) static intCONSTANT_UTF8_TAGThe tag value of CONSTANT_Utf8_info JVMS structures.(package private) longdataThe numeric value of this symbol.(package private) intindexThe index of this symbol in the constant pool, in the BootstrapMethods attribute, or in the (ASM specific) type table of a class (depending on thetagvalue).(package private) intinfoAdditional information about this symbol, generally computed lazily.(package private) static intMERGED_TYPE_TAGThe tag value of a merged type entry in the (ASM specific) type table of a class.(package private) java.lang.StringnameThe name of the class field or method corresponding to this symbol.(package private) java.lang.StringownerThe internal name of the owner class of this symbol.(package private) inttagA tag indicating the type of this symbol.(package private) static intTYPE_TAGThe tag value of a normal type entry in the (ASM specific) type table of a class.(package private) static intUNINITIALIZED_TYPE_TAGThe tag value of anFrame.ITEM_UNINITIALIZEDtype entry in the type table of a class.(package private) java.lang.StringvalueThe string value of this symbol.
-
Constructor Summary
Constructors Constructor Description Symbol(int index, int tag, java.lang.String owner, java.lang.String name, java.lang.String value, long data)Constructs a new Symbol.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) intgetArgumentsAndReturnSizes()Returns the resultType.getArgumentsAndReturnSizes()onvalue.
-
-
-
Field Detail
-
CONSTANT_CLASS_TAG
static final int CONSTANT_CLASS_TAG
The tag value of CONSTANT_Class_info JVMS structures.- See Also:
- Constant Field Values
-
CONSTANT_FIELDREF_TAG
static final int CONSTANT_FIELDREF_TAG
The tag value of CONSTANT_Fieldref_info JVMS structures.- See Also:
- Constant Field Values
-
CONSTANT_METHODREF_TAG
static final int CONSTANT_METHODREF_TAG
The tag value of CONSTANT_Methodref_info JVMS structures.- See Also:
- Constant Field Values
-
CONSTANT_INTERFACE_METHODREF_TAG
static final int CONSTANT_INTERFACE_METHODREF_TAG
The tag value of CONSTANT_InterfaceMethodref_info JVMS structures.- See Also:
- Constant Field Values
-
CONSTANT_STRING_TAG
static final int CONSTANT_STRING_TAG
The tag value of CONSTANT_String_info JVMS structures.- See Also:
- Constant Field Values
-
CONSTANT_INTEGER_TAG
static final int CONSTANT_INTEGER_TAG
The tag value of CONSTANT_Integer_info JVMS structures.- See Also:
- Constant Field Values
-
CONSTANT_FLOAT_TAG
static final int CONSTANT_FLOAT_TAG
The tag value of CONSTANT_Float_info JVMS structures.- See Also:
- Constant Field Values
-
CONSTANT_LONG_TAG
static final int CONSTANT_LONG_TAG
The tag value of CONSTANT_Long_info JVMS structures.- See Also:
- Constant Field Values
-
CONSTANT_DOUBLE_TAG
static final int CONSTANT_DOUBLE_TAG
The tag value of CONSTANT_Double_info JVMS structures.- See Also:
- Constant Field Values
-
CONSTANT_NAME_AND_TYPE_TAG
static final int CONSTANT_NAME_AND_TYPE_TAG
The tag value of CONSTANT_NameAndType_info JVMS structures.- See Also:
- Constant Field Values
-
CONSTANT_UTF8_TAG
static final int CONSTANT_UTF8_TAG
The tag value of CONSTANT_Utf8_info JVMS structures.- See Also:
- Constant Field Values
-
CONSTANT_METHOD_HANDLE_TAG
static final int CONSTANT_METHOD_HANDLE_TAG
The tag value of CONSTANT_MethodHandle_info JVMS structures.- See Also:
- Constant Field Values
-
CONSTANT_METHOD_TYPE_TAG
static final int CONSTANT_METHOD_TYPE_TAG
The tag value of CONSTANT_MethodType_info JVMS structures.- See Also:
- Constant Field Values
-
CONSTANT_DYNAMIC_TAG
static final int CONSTANT_DYNAMIC_TAG
The tag value of CONSTANT_Dynamic_info JVMS structures.- See Also:
- Constant Field Values
-
CONSTANT_INVOKE_DYNAMIC_TAG
static final int CONSTANT_INVOKE_DYNAMIC_TAG
The tag value of CONSTANT_InvokeDynamic_info JVMS structures.- See Also:
- Constant Field Values
-
CONSTANT_MODULE_TAG
static final int CONSTANT_MODULE_TAG
The tag value of CONSTANT_Module_info JVMS structures.- See Also:
- Constant Field Values
-
CONSTANT_PACKAGE_TAG
static final int CONSTANT_PACKAGE_TAG
The tag value of CONSTANT_Package_info JVMS structures.- See Also:
- Constant Field Values
-
BOOTSTRAP_METHOD_TAG
static final int BOOTSTRAP_METHOD_TAG
The tag value of the BootstrapMethods attribute entries.- See Also:
- Constant Field Values
-
TYPE_TAG
static final int TYPE_TAG
The tag value of a normal type entry in the (ASM specific) type table of a class.- See Also:
- Constant Field Values
-
UNINITIALIZED_TYPE_TAG
static final int UNINITIALIZED_TYPE_TAG
The tag value of anFrame.ITEM_UNINITIALIZEDtype entry in the type table of a class.- See Also:
- Constant Field Values
-
MERGED_TYPE_TAG
static final int MERGED_TYPE_TAG
The tag value of a merged type entry in the (ASM specific) type table of a class.- See Also:
- Constant Field Values
-
index
final int index
The index of this symbol in the constant pool, in the BootstrapMethods attribute, or in the (ASM specific) type table of a class (depending on thetagvalue).
-
tag
final int tag
A tag indicating the type of this symbol. Must be one of the static tag values defined in this class.
-
owner
final java.lang.String owner
The internal name of the owner class of this symbol. Only used forCONSTANT_FIELDREF_TAG,CONSTANT_METHODREF_TAG,CONSTANT_INTERFACE_METHODREF_TAG, andCONSTANT_METHOD_HANDLE_TAGsymbols.
-
name
final java.lang.String name
The name of the class field or method corresponding to this symbol. Only used forCONSTANT_FIELDREF_TAG,CONSTANT_METHODREF_TAG,CONSTANT_INTERFACE_METHODREF_TAG,CONSTANT_NAME_AND_TYPE_TAG,CONSTANT_METHOD_HANDLE_TAG,CONSTANT_DYNAMIC_TAGandCONSTANT_INVOKE_DYNAMIC_TAGsymbols.
-
value
final java.lang.String value
The string value of this symbol. This is:- a field or method descriptor for
CONSTANT_FIELDREF_TAG,CONSTANT_METHODREF_TAG,CONSTANT_INTERFACE_METHODREF_TAG,CONSTANT_NAME_AND_TYPE_TAG,CONSTANT_METHOD_HANDLE_TAG,CONSTANT_METHOD_TYPE_TAG,CONSTANT_DYNAMIC_TAGandCONSTANT_INVOKE_DYNAMIC_TAGsymbols, - an arbitrary string for
CONSTANT_UTF8_TAGandCONSTANT_STRING_TAGsymbols, - an internal class name for
CONSTANT_CLASS_TAG,TYPE_TAGandUNINITIALIZED_TYPE_TAGsymbols, - null for the other types of symbol.
- a field or method descriptor for
-
data
final long data
The numeric value of this symbol. This is:- the symbol's value for
CONSTANT_INTEGER_TAG,CONSTANT_FLOAT_TAG,CONSTANT_LONG_TAG,CONSTANT_DOUBLE_TAG, - the CONSTANT_MethodHandle_info reference_kind field value for
CONSTANT_METHOD_HANDLE_TAGsymbols, - the CONSTANT_InvokeDynamic_info bootstrap_method_attr_index field value for
CONSTANT_INVOKE_DYNAMIC_TAGsymbols, - the offset of a bootstrap method in the BootstrapMethods boostrap_methods array, for
CONSTANT_DYNAMIC_TAGorBOOTSTRAP_METHOD_TAGsymbols, - the bytecode offset of the NEW instruction that created an
Frame.ITEM_UNINITIALIZEDtype forUNINITIALIZED_TYPE_TAGsymbols, - the indices (in the class' type table) of two
TYPE_TAGsource types forMERGED_TYPE_TAGsymbols, - 0 for the other types of symbol.
- the symbol's value for
-
info
int info
Additional information about this symbol, generally computed lazily. Warning: the value of this field is ignored when comparing Symbol instances (to avoid duplicate entries in a SymbolTable). Therefore, this field should only contain data that can be computed from the other fields of this class. It contains:- the
Type.getArgumentsAndReturnSizes()of the symbol's method descriptor forCONSTANT_METHODREF_TAG,CONSTANT_INTERFACE_METHODREF_TAGandCONSTANT_INVOKE_DYNAMIC_TAGsymbols, - the index in the InnerClasses_attribute 'classes' array (plus one) corresponding to this
class, for
CONSTANT_CLASS_TAGsymbols, - the index (in the class' type table) of the merged type of the two source types for
MERGED_TYPE_TAGsymbols, - 0 for the other types of symbol, or if this field has not been computed yet.
- the
-
-
Constructor Detail
-
Symbol
Symbol(int index, int tag, java.lang.String owner, java.lang.String name, java.lang.String value, long data)Constructs a new Symbol. This constructor can't be used directly because the Symbol class is abstract. Instead, use the factory methods of theSymbolTableclass.- Parameters:
index- the symbol index in the constant pool, in the BootstrapMethods attribute, or in the (ASM specific) type table of a class (depending on 'tag').tag- the symbol type. Must be one of the static tag values defined in this class.owner- The internal name of the symbol's owner class. Maybe null.name- The name of the symbol's corresponding class field or method. Maybe null.value- The string value of this symbol. Maybe null.data- The numeric value of this symbol.
-
-
Method Detail
-
getArgumentsAndReturnSizes
int getArgumentsAndReturnSizes()
Returns the resultType.getArgumentsAndReturnSizes()onvalue.- Returns:
- the result
Type.getArgumentsAndReturnSizes()onvalue(memoized ininfofor efficiency). This should only be used forCONSTANT_METHODREF_TAG,CONSTANT_INTERFACE_METHODREF_TAGandCONSTANT_INVOKE_DYNAMIC_TAGsymbols.
-
-