Package org.apache.bcel.classfile
Class BootstrapMethod
java.lang.Object
org.apache.bcel.classfile.BootstrapMethod
- All Implemented Interfaces:
Cloneable
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int[]
Array of references to the constant_pool tableprivate int
Index of the CONSTANT_MethodHandle_info structure in the constant_pool table -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
BootstrapMethod
(int bootstrap_method_ref, int num_bootstrap_arguments) BootstrapMethod
(int bootstrap_method_ref, int[] bootstrap_arguments) (package private)
BootstrapMethod
(DataInput input) Construct object from input stream.Initialize from another object. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
final void
dump
(DataOutputStream file) Dump object to file stream in binary format.int[]
int
int
void
setBootstrapArguments
(int[] bootstrap_arguments) void
setBootstrapMethodRef
(int bootstrap_method_ref) final String
toString()
final String
toString
(ConstantPool constant_pool)
-
Field Details
-
bootstrap_method_ref
private int bootstrap_method_refIndex of the CONSTANT_MethodHandle_info structure in the constant_pool table -
bootstrap_arguments
private int[] bootstrap_argumentsArray of references to the constant_pool table
-
-
Constructor Details
-
BootstrapMethod
Initialize from another object. -
BootstrapMethod
BootstrapMethod(DataInput input) throws IOException Construct object from input stream.- Parameters:
input
- Input stream- Throws:
IOException
-
BootstrapMethod
private BootstrapMethod(int bootstrap_method_ref, int num_bootstrap_arguments) -
BootstrapMethod
public BootstrapMethod(int bootstrap_method_ref, int[] bootstrap_arguments) - Parameters:
bootstrap_method_ref
- int index into constant_pool of CONSTANT_MethodHandlebootstrap_arguments
- int[] indices into constant_pool of CONSTANT_[type]_info
-
-
Method Details
-
getBootstrapMethodRef
public int getBootstrapMethodRef()- Returns:
- index into constant_pool of bootstrap_method
-
setBootstrapMethodRef
public void setBootstrapMethodRef(int bootstrap_method_ref) - Parameters:
bootstrap_method_ref
- int index into constant_pool of CONSTANT_MethodHandle
-
getBootstrapArguments
public int[] getBootstrapArguments()- Returns:
- int[] of bootstrap_method indices into constant_pool of CONSTANT_[type]_info
-
getNumBootstrapArguments
public int getNumBootstrapArguments()- Returns:
- count of number of boostrap arguments
-
setBootstrapArguments
public void setBootstrapArguments(int[] bootstrap_arguments) - Parameters:
bootstrap_arguments
- int[] indices into constant_pool of CONSTANT_[type]_info
-
toString
-
toString
- Returns:
- Resolved string representation
-
dump
Dump object to file stream in binary format.- Parameters:
file
- Output file stream- Throws:
IOException
-
copy
- Returns:
- deep copy of this object
-