Package org.apache.bcel.classfile
Class BootstrapMethod
- java.lang.Object
-
- org.apache.bcel.classfile.BootstrapMethod
-
- All Implemented Interfaces:
java.lang.Cloneable
public class BootstrapMethod extends java.lang.Object implements java.lang.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:
- The class File Format : The BootstrapMethods Attribute
-
-
Field Summary
Fields Modifier and Type Field Description private int[]
bootstrapArguments
Array of references to the constant_pool tableprivate int
bootstrapMethodRef
Index of the CONSTANT_MethodHandle_info structure in the constant_pool table
-
Constructor Summary
Constructors Modifier Constructor Description private
BootstrapMethod(int bootstrap_method_ref, int num_bootstrap_arguments)
BootstrapMethod(int bootstrapMethodRef, int[] bootstrapArguments)
(package private)
BootstrapMethod(java.io.DataInput input)
Construct object from input stream.BootstrapMethod(BootstrapMethod c)
Initialize from another object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BootstrapMethod
copy()
void
dump(java.io.DataOutputStream file)
Dump object to file stream in binary format.int[]
getBootstrapArguments()
int
getBootstrapMethodRef()
int
getNumBootstrapArguments()
void
setBootstrapArguments(int[] bootstrapArguments)
void
setBootstrapMethodRef(int bootstrapMethodRef)
java.lang.String
toString()
java.lang.String
toString(ConstantPool constantPool)
-
-
-
Constructor Detail
-
BootstrapMethod
public BootstrapMethod(BootstrapMethod c)
Initialize from another object.
-
BootstrapMethod
BootstrapMethod(java.io.DataInput input) throws java.io.IOException
Construct object from input stream.- Parameters:
input
- Input stream- Throws:
java.io.IOException
-
BootstrapMethod
private BootstrapMethod(int bootstrap_method_ref, int num_bootstrap_arguments)
-
BootstrapMethod
public BootstrapMethod(int bootstrapMethodRef, int[] bootstrapArguments)
- Parameters:
bootstrapMethodRef
- int index into constant_pool of CONSTANT_MethodHandlebootstrapArguments
- int[] indices into constant_pool of CONSTANT_[type]_info
-
-
Method Detail
-
getBootstrapMethodRef
public int getBootstrapMethodRef()
- Returns:
- index into constant_pool of bootstrap_method
-
setBootstrapMethodRef
public void setBootstrapMethodRef(int bootstrapMethodRef)
- Parameters:
bootstrapMethodRef
- 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[] bootstrapArguments)
- Parameters:
bootstrapArguments
- int[] indices into constant_pool of CONSTANT_[type]_info
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- Returns:
- String representation.
-
toString
public final java.lang.String toString(ConstantPool constantPool)
- Returns:
- Resolved string representation
-
dump
public final void dump(java.io.DataOutputStream file) throws java.io.IOException
Dump object to file stream in binary format.- Parameters:
file
- Output file stream- Throws:
java.io.IOException
-
copy
public BootstrapMethod copy()
- Returns:
- deep copy of this object
-
-