Class BootstrapMethod
java.lang.Object
org.apache.bcel.classfile.BootstrapMethod
- All Implemented Interfaces:
Cloneable
This class represents a bootstrap method attribute, that is, the bootstrap method ref, the number of bootstrap arguments
and an array of the bootstrap arguments.
- Since:
- 6.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBootstrapMethod(int bootstrapMethodRef, int[] bootstrapArguments) Constructs a BootstrapMethod.Initialize from another object. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a deep copy of this object.final voiddump(DataOutputStream file) Dumps object to file stream in binary format.int[]Gets the bootstrap arguments.intGets the bootstrap method reference.intGets the count of number of bootstrap arguments.voidsetBootstrapArguments(int[] bootstrapArguments) Sets the bootstrap arguments.voidsetBootstrapMethodRef(int bootstrapMethodRef) Sets the bootstrap method reference.final StringtoString()Gets a string representation.final StringtoString(ConstantPool constantPool) Gets a resolved string representation.
-
Constructor Details
-
BootstrapMethod
Initialize from another object.- Parameters:
c- Source to copy.
-
BootstrapMethod
Constructs a BootstrapMethod.- Parameters:
bootstrapMethodRef- int index into constant_pool of CONSTANT_MethodHandle.bootstrapArguments- int[] indices into constant_pool of CONSTANT_[type]_info.
-
-
Method Details
-
copy
Creates a deep copy of this object.- Returns:
- deep copy of this object.
-
dump
Dumps object to file stream in binary format.- Parameters:
file- Output file stream.- Throws:
IOException- if an I/O error occurs.
-
getBootstrapArguments
Gets the bootstrap arguments.- Returns:
- int[] of bootstrap_method indices into constant_pool of CONSTANT_[type]_info.
-
getBootstrapMethodRef
Gets the bootstrap method reference.- Returns:
- index into constant_pool of bootstrap_method.
-
getNumBootstrapArguments
Gets the count of number of bootstrap arguments.- Returns:
- count of number of bootstrap arguments.
-
setBootstrapArguments
Sets the bootstrap arguments.- Parameters:
bootstrapArguments- int[] indices into constant_pool of CONSTANT_[type]_info.
-
setBootstrapMethodRef
Sets the bootstrap method reference.- Parameters:
bootstrapMethodRef- int index into constant_pool of CONSTANT_MethodHandle.
-
toString
-
toString
Gets a resolved string representation.- Parameters:
constantPool- the constant pool.- Returns:
- Resolved string representation.
-