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

public Class BootstrapMethod

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
java.io.DataInput, .DataOutputStream, .IOException, java.util.Arrays, com.sun.org.apache.bcel.internal.Const, jdk.xml.internal.Utils

This class represents a bootstrap method attribute, i.e., the bootstrap method ref, the number of bootstrap arguments and an array of the bootstrap arguments.
Since
6.0
See Also
The class File Format : The BootstrapMethods Attribute

Field Summary

Modifier and TypeField and Description
private int[]
bootstrapArguments

Array of references to the constant_pool table

private int
bootstrapMethodRef

Index of the CONSTANT_MethodHandle_info structure in the constant_pool table

pack-priv static final BootstrapMethod[]

Constructor Summary

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

Initialize from another object.

pack-priv
BootstrapMethod(final DataInput
Input stream
input
)

Constructs object from input stream.

private
BootstrapMethod(final int bootstrapMethodRef, final int numBootstrapArguments)

public
BootstrapMethod(final int
int index into constant_pool of CONSTANT_MethodHandle
bootstrapMethodRef
,
final int[]
int[] indices into constant_pool of CONSTANT_[type]_info
bootstrapArguments
)

Method Summary

Modifier and TypeMethod and Description
public BootstrapMethod
copy()

Returns: deep copy of this object

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

Dump object to file stream in binary format.

public int[]
getBootstrapArguments()

Returns: int[] of bootstrap_method indices into constant_pool of CONSTANT_[type]_info

public int
getBootstrapMethodRef()

Returns: index into constant_pool of bootstrap_method

public int
getNumBootstrapArguments()

Returns: count of number of boostrap arguments

public void
setBootstrapArguments(final int[]
int[] indices into constant_pool of CONSTANT_[type]_info
bootstrapArguments
)

public void
setBootstrapMethodRef(final int
int index into constant_pool of CONSTANT_MethodHandle
bootstrapMethodRef
)

public final String

Returns:

String representation.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public final String
toString(final ConstantPool constantPool)

Returns: Resolved string representation

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

bootstrapArgumentsback to summary
private int[] bootstrapArguments

Array of references to the constant_pool table

bootstrapMethodRefback to summary
private int bootstrapMethodRef

Index of the CONSTANT_MethodHandle_info structure in the constant_pool table

EMPTY_ARRAYback to summary
pack-priv static final BootstrapMethod[] EMPTY_ARRAY

Constructor Detail

BootstrapMethodback to summary
public BootstrapMethod(final BootstrapMethod c)

Initialize from another object.

Parameters
c:BootstrapMethod

Source to copy.

BootstrapMethodback to summary
pack-priv BootstrapMethod(final DataInput input) throws IOException

Constructs object from input stream.

Parameters
input:DataInput

Input stream

Exceptions
IOException:
if an I/O error occurs.
BootstrapMethodback to summary
private BootstrapMethod(final int bootstrapMethodRef, final int numBootstrapArguments)
BootstrapMethodback to summary
public BootstrapMethod(final int bootstrapMethodRef, final int[] bootstrapArguments)
Parameters
bootstrapMethodRef:int

int index into constant_pool of CONSTANT_MethodHandle

bootstrapArguments:int[]

int[] indices into constant_pool of CONSTANT_[type]_info

Method Detail

copyback to summary
public BootstrapMethod copy()
Returns:BootstrapMethod

deep copy of this object

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

Dump object to file stream in binary format.

Parameters
file:DataOutputStream

Output file stream

Exceptions
IOException:
if an I/O error occurs.
getBootstrapArgumentsback to summary
public int[] getBootstrapArguments()
Returns:int[]

int[] of bootstrap_method indices into constant_pool of CONSTANT_[type]_info

getBootstrapMethodRefback to summary
public int getBootstrapMethodRef()
Returns:int

index into constant_pool of bootstrap_method

getNumBootstrapArgumentsback to summary
public int getNumBootstrapArguments()
Returns:int

count of number of boostrap arguments

setBootstrapArgumentsback to summary
public void setBootstrapArguments(final int[] bootstrapArguments)
Parameters
bootstrapArguments:int[]

int[] indices into constant_pool of CONSTANT_[type]_info

setBootstrapMethodRefback to summary
public void setBootstrapMethodRef(final int bootstrapMethodRef)
Parameters
bootstrapMethodRef:int

int index into constant_pool of CONSTANT_MethodHandle

toStringback to summary
public final String toString()

Overrides java.lang.Object.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
toStringback to summary
public final String toString(final ConstantPool constantPool)
Returns:String

Resolved string representation