Package javassist.bytecode
Class EnclosingMethodAttribute
java.lang.Object
javassist.bytecode.AttributeInfo
javassist.bytecode.EnclosingMethodAttribute
EnclosingMethod_attribute
.-
Field Summary
-
Constructor Summary
ConstructorDescriptionEnclosingMethodAttribute
(ConstPool cp, String className) Constructs an EnclosingMethod attribute.EnclosingMethodAttribute
(ConstPool cp, String className, String methodName, String methodDesc) Constructs an EnclosingMethod attribute. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value ofclass_index
.Returns the name of the class specified byclass_index
.Makes a copy.Returns the method descriptor specified bymethod_index
.int
Returns the value ofmethod_index
.Returns the method name specified bymethod_index
.Methods inherited from class javassist.bytecode.AttributeInfo
get, getConstPool, getName, length, set
-
Field Details
-
tag
The name of this attribute"EnclosingMethod"
.- See Also:
-
-
Constructor Details
-
EnclosingMethodAttribute
public EnclosingMethodAttribute(ConstPool cp, String className, String methodName, String methodDesc) Constructs an EnclosingMethod attribute.- Parameters:
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.
-
EnclosingMethodAttribute
Constructs an EnclosingMethod attribute. The value ofmethod_index
is set to 0.- Parameters:
cp
- a constant pool table.className
- the name of the innermost enclosing class.
-
-
Method Details
-
classIndex
public int classIndex()Returns the value ofclass_index
. -
methodIndex
public int methodIndex()Returns the value ofmethod_index
. -
className
Returns the name of the class specified byclass_index
. -
methodName
Returns the method name specified bymethod_index
. If the method is a class initializer (static constructor),MethodInfo.nameClinit
is returned. -
methodDescriptor
Returns the method descriptor specified bymethod_index
. -
copy
Makes a copy. Class names are replaced according to the givenMap
object.- Overrides:
copy
in classAttributeInfo
- Parameters:
newCp
- the constant pool table used by the new copy.classnames
- pairs of replaced and substituted class names.
-