Top Description Fields Constructors Methods
org.apache.bcel.classfile

public Class EnclosingMethod

extends Attribute
Class Inheritance
Imports
java.io.DataInput, .DataOutputStream, .IOException, org.apache.bcel.Const, org.apache.bcel.util.Args

This attribute exists for local or anonymous classes and ... there can be only one.
Since
6.0

Field Summary

Modifier and TypeField and Description
private int
private int
Inherited from org.apache.bcel.classfile.Attribute:
constant_poolEMPTY_ARRAYlengthname_indextag

Constructor Summary

AccessConstructor and Description
pack-priv
EnclosingMethod(final int nameIndex, final int len, final DataInput input, final ConstantPool cpool)

private
EnclosingMethod(final int nameIndex, final int len, final int classIndex, final int methodIndex, final ConstantPool cpool)

Method Summary

Modifier and TypeMethod and Description
public void
accept(final Visitor
Visitor object
v
)

Implements abstract org.apache.bcel.classfile.Attribute.accept.

Implements org.apache.bcel.classfile.Node.accept.

Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class.
public Attribute
copy(final ConstantPool
constant pool to save.
constantPool
)

Implements abstract org.apache.bcel.classfile.Attribute.copy.

public final void
dump(final DataOutputStream
Output file stream
file
)

Overrides org.apache.bcel.classfile.Attribute.dump.

Dumps attribute to file stream in binary format.
public final ConstantClass
public final int
public final ConstantNameAndType
public final int
public final void
setEnclosingClassIndex(final int idx)

public final void
setEnclosingMethodIndex(final int idx)

Inherited from org.apache.bcel.classfile.Attribute:
addAttributeReaderaddAttributeReaderclonegetConstantPoolgetLengthgetNamegetNameIndexgetTagprintlnreadAttributereadAttributeremoveAttributeReadersetConstantPoolsetLengthsetNameIndextoString

Field Detail

classIndexback to summary
private int classIndex
methodIndexback to summary
private int methodIndex

Constructor Detail

EnclosingMethodback to summary
pack-priv EnclosingMethod(final int nameIndex, final int len, final DataInput input, final ConstantPool cpool) throws IOException
EnclosingMethodback to summary
private EnclosingMethod(final int nameIndex, final int len, final int classIndex, final int methodIndex, final ConstantPool cpool)

Method Detail

acceptback to summary
public void accept(final Visitor v)

Implements abstract org.apache.bcel.classfile.Attribute.accept.

Implements org.apache.bcel.classfile.Node.accept.

Doc from org.apache.bcel.classfile.Attribute.accept.

Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.

Parameters
v:Visitor

Visitor object

Annotations
@Override
copyback to summary
public Attribute copy(final ConstantPool constantPool)

Implements abstract org.apache.bcel.classfile.Attribute.copy.

Parameters
constantPool:ConstantPool

Doc from org.apache.bcel.classfile.Attribute.copy.

constant pool to save.

Returns:Attribute

Doc from org.apache.bcel.classfile.Attribute.copy.

deep copy of this attribute.

Annotations
@Override
dumpback to summary
public final void dump(final DataOutputStream file) throws IOException

Overrides org.apache.bcel.classfile.Attribute.dump.

Doc from org.apache.bcel.classfile.Attribute.dump.

Dumps attribute to file stream in binary format.

Parameters
file:DataOutputStream

Output file stream

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
getEnclosingClassback to summary
public final ConstantClass getEnclosingClass()
getEnclosingClassIndexback to summary
public final int getEnclosingClassIndex()
getEnclosingMethodback to summary
public final ConstantNameAndType getEnclosingMethod()
getEnclosingMethodIndexback to summary
public final int getEnclosingMethodIndex()
setEnclosingClassIndexback to summary
public final void setEnclosingClassIndex(final int idx)
setEnclosingMethodIndexback to summary
public final void setEnclosingMethodIndex(final int idx)