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

public Class MethodParameters

extends Attribute
implements Iterable<MethodParameter>
Class Inheritance
All Implemented Interfaces
java.lang.Iterable
Imports
java.io.DataInput, .DataOutputStream, .IOException, java.util.Arrays, .Iterator, java.util.stream.Stream, org.apache.bcel.Const

This class represents a MethodParameters attribute.
Since
6.0
See Also
The class File Format : The MethodParameters Attribute

Field Summary

Modifier and TypeField and Description
private static final MethodParameter[]
private MethodParameter[]
Inherited from org.apache.bcel.classfile.Attribute:
constant_poolEMPTY_ARRAYlengthname_indextag

Constructor Summary

AccessConstructor and Description
pack-priv
MethodParameters(final int nameIndex, final int length, final DataInput input, final ConstantPool constantPool)

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 void
dump(final DataOutputStream
Output file stream
file
)

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

Dump method parameters attribute to file stream in binary format.
public MethodParameter[]
public Iterator<MethodParameter>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.
public void
setParameters(final MethodParameter[] parameters)

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

Field Detail

EMPTY_METHOD_PARAMETER_ARRAYback to summary
private static final MethodParameter[] EMPTY_METHOD_PARAMETER_ARRAY

Empty array.

parametersback to summary
private MethodParameter[] parameters

Constructor Detail

MethodParametersback to summary
pack-priv MethodParameters(final int nameIndex, final int length, final DataInput input, final ConstantPool constantPool) throws IOException

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 void dump(final DataOutputStream file) throws IOException

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

Dump method parameters attribute to file stream in binary format.

Parameters
file:DataOutputStream

Output file stream

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
getParametersback to summary
public MethodParameter[] getParameters()
iteratorback to summary
public Iterator<MethodParameter> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<MethodParameter>

an Iterator.

Annotations
@Override
setParametersback to summary
public void setParameters(final MethodParameter[] parameters)