public class EnclosingMethodAttribute extends AttributeInfo
EnclosingMethod_attribute.| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
tag |
The name of this attribute
"EnclosingMethod". |
| Constructor | Description |
|---|---|
EnclosingMethodAttribute(ConstPool cp,
java.lang.String className) |
Constructs an EnclosingMethod attribute.
|
EnclosingMethodAttribute(ConstPool cp,
java.lang.String className,
java.lang.String methodName,
java.lang.String methodDesc) |
Constructs an EnclosingMethod attribute.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
classIndex() |
Returns the value of
class_index. |
java.lang.String |
className() |
Returns the name of the class specified by
class_index. |
AttributeInfo |
copy(ConstPool newCp,
java.util.Map classnames) |
Makes a copy.
|
java.lang.String |
methodDescriptor() |
Returns the method descriptor specified by
method_index. |
int |
methodIndex() |
Returns the value of
method_index. |
java.lang.String |
methodName() |
Returns the method name specified by
method_index. |
get, getConstPool, getName, length, setpublic static final java.lang.String tag
"EnclosingMethod".public EnclosingMethodAttribute(ConstPool cp, java.lang.String className, java.lang.String methodName, java.lang.String methodDesc)
cp - a constant pool table.className - the name of the innermost enclosing class.methodName - the name of the enclosing method.methodDesc - the descriptor of the enclosing method.public EnclosingMethodAttribute(ConstPool cp, java.lang.String className)
method_index is set to 0.cp - a constant pool table.className - the name of the innermost enclosing class.public int classIndex()
class_index.public int methodIndex()
method_index.public java.lang.String className()
class_index.public java.lang.String methodName()
method_index.
If the method is a class initializer (static constructor),
MethodInfo.nameClinit is returned.public java.lang.String methodDescriptor()
method_index.public AttributeInfo copy(ConstPool newCp, java.util.Map classnames)
Map object.copy in class AttributeInfonewCp - the constant pool table used by the new copy.classnames - pairs of replaced and substituted
class names.Javassist, a Java-bytecode translator toolkit.
Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.