javassist.bytecode

Class EnclosingMethodAttribute

public class EnclosingMethodAttribute extends AttributeInfo

EnclosingMethod_attribute.
Field Summary
static Stringtag
The name of this attribute "EnclosingMethod".
Constructor Summary
EnclosingMethodAttribute(ConstPool cp, String className, String methodName, String methodDesc)
Constructs an EnclosingMethod attribute.
EnclosingMethodAttribute(ConstPool cp, String className)
Constructs an EnclosingMethod attribute.
Method Summary
intclassIndex()
Returns the value of class_index.
StringclassName()
Returns the name of the class specified by class_index.
AttributeInfocopy(ConstPool newCp, Map classnames)
Makes a copy.
StringmethodDescriptor()
Returns the method descriptor specified by method_index.
intmethodIndex()
Returns the value of method_index.
StringmethodName()
Returns the method name specified by method_index.

Field Detail

tag

public static final String tag
The name of this attribute "EnclosingMethod".

Constructor Detail

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

public EnclosingMethodAttribute(ConstPool cp, String className)
Constructs an EnclosingMethod attribute. The value of method_index is set to 0.

Parameters: cp a constant pool table. className the name of the innermost enclosing class.

Method Detail

classIndex

public int classIndex()
Returns the value of class_index.

className

public String className()
Returns the name of the class specified by class_index.

copy

public AttributeInfo copy(ConstPool newCp, Map classnames)
Makes a copy. Class names are replaced according to the given Map object.

Parameters: newCp the constant pool table used by the new copy. classnames pairs of replaced and substituted class names.

methodDescriptor

public String methodDescriptor()
Returns the method descriptor specified by method_index.

methodIndex

public int methodIndex()
Returns the value of method_index.

methodName

public String methodName()
Returns the method name specified by method_index.
Javassist, a Java-bytecode translator toolkit.
Copyright (C) 1999-2006 Shigeru Chiba. All Rights Reserved.