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

public Class BootstrapMethods

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

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

Field Summary

Modifier and TypeField and Description
private BootstrapMethod[]
Inherited from com.sun.org.apache.bcel.internal.classfile.Attribute:
constant_poolEMPTY_ARRAYlengthname_indextag

Constructor Summary

AccessConstructor and Description
public
BootstrapMethods(final BootstrapMethods
Source to copy.
c
)

Initialize from another object.

public
BootstrapMethods(final int
Index in constant pool to CONSTANT_Utf8
nameIndex
,
final int
Content length in bytes
length
,
final BootstrapMethod[]
array of bootstrap methods
bootstrapMethods
,
final ConstantPool
Array of constants
constantPool
)

pack-priv
BootstrapMethods(final int
Index in constant pool to CONSTANT_Utf8
nameIndex
,
final int
Content length in bytes
length
,
final DataInput
Input stream
input
,
final ConstantPool
Array of constants
constantPool
)

Constructs object from Input stream.

Method Summary

Modifier and TypeMethod and Description
public void
accept(final Visitor
Visitor object
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 BootstrapMethods
copy(final ConstantPool constantPool)

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

Returns: deep copy of this attribute

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

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

Dump bootstrap methods attribute to file stream in binary format.

public final BootstrapMethod[]
getBootstrapMethods()

Returns: array of bootstrap method "records"

public Iterator<BootstrapMethod>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public final void
setBootstrapMethods(final BootstrapMethod[]
the array of bootstrap methods
bootstrapMethods
)

public final String

Returns:

String representation.
toString
()

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

Returns a string representation of the object.

Inherited from com.sun.org.apache.bcel.internal.classfile.Attribute:
addAttributeReaderclonegetConstantPoolgetLengthgetNamegetNameIndexgetTagprintlnreadAttributereadAttributeremoveAttributeReadersetConstantPoolsetLengthsetNameIndex

Field Detail

bootstrapMethodsback to summary
private BootstrapMethod[] bootstrapMethods

Constructor Detail

BootstrapMethodsback to summary
public BootstrapMethods(final BootstrapMethods c)

Initialize from another object. Note that both objects use the same references (shallow copy). Use clone() for a physical copy.

Parameters
c:BootstrapMethods

Source to copy.

BootstrapMethodsback to summary
public BootstrapMethods(final int nameIndex, final int length, final BootstrapMethod[] bootstrapMethods, final ConstantPool constantPool)
Parameters
nameIndex:int

Index in constant pool to CONSTANT_Utf8

length:int

Content length in bytes

bootstrapMethods:BootstrapMethod[]

array of bootstrap methods

constantPool:ConstantPool

Array of constants

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

Constructs object from Input stream.

Parameters
nameIndex:int

Index in constant pool to CONSTANT_Utf8

length:int

Content length in bytes

input:DataInput

Input stream

constantPool:ConstantPool

Array of constants

Exceptions
IOException:
if an I/O error occurs.

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.

Parameters
v:Visitor

Visitor object

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

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

Returns:BootstrapMethods

deep copy of this attribute

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

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

Dump bootstrap methods attribute to file stream in binary format.

Parameters
file:DataOutputStream

Output file stream

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
getBootstrapMethodsback to summary
public final BootstrapMethod[] getBootstrapMethods()
Returns:BootstrapMethod[]

array of bootstrap method "records"

iteratorback to summary
public Iterator<BootstrapMethod> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Annotations
@Override
setBootstrapMethodsback to summary
public final void setBootstrapMethods(final BootstrapMethod[] bootstrapMethods)
Parameters
bootstrapMethods:BootstrapMethod[]

the array of bootstrap methods

toStringback to summary
public final String toString()

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

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

String representation.

Annotations
@Override