APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.bcel.internal.classfile

public Class EnclosingMethod

extends Attribute
Class Inheritance
Imports
java.io.DataInput, .DataOutputStream, .IOException, com.sun.org.apache.bcel.internal.Const, com.sun.org.apache.bcel.internal.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 com.sun.org.apache.bcel.internal.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 v)

Implements abstract com.sun.org.apache.bcel.internal.classfile.Attribute.accept.

Implements com.sun.org.apache.bcel.internal.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
public final void
dump(final DataOutputStream file)

Overrides com.sun.org.apache.bcel.internal.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 com.sun.org.apache.bcel.internal.classfile.Attribute:
addAttributeReaderclonegetConstantPoolgetLengthgetNamegetNameIndexgetTagprintlnreadAttributereadAttributeremoveAttributeReadersetConstantPoolsetLengthsetNameIndextoString

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 com.sun.org.apache.bcel.internal.classfile.Attribute.accept.

Implements com.sun.org.apache.bcel.internal.classfile.Node.accept.

Doc from com.sun.org.apache.bcel.internal.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.

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

Implements abstract com.sun.org.apache.bcel.internal.classfile.Attribute.copy.

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

Overrides com.sun.org.apache.bcel.internal.classfile.Attribute.dump.

Doc from com.sun.org.apache.bcel.internal.classfile.Attribute.dump.

Dumps attribute to file stream in binary format.

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)