Class BootstrapMethods
java.lang.Object
org.apache.bcel.classfile.Attribute
org.apache.bcel.classfile.BootstrapMethods
- All Implemented Interfaces:
Cloneable, Iterable<BootstrapMethod>, Node
This class represents a BootstrapMethods attribute.
- Since:
- 6.0
- See Also:
-
Field Summary
Fields inherited from class Attribute
constant_pool, EMPTY_ARRAY, length, name_index, tag -
Constructor Summary
ConstructorsConstructorDescriptionBootstrapMethods(int nameIndex, int length, BootstrapMethod[] bootstrapMethods, ConstantPool constantPool) Constructs a BootstrapMethods attribute.Initialize from another object. -
Method Summary
Modifier and TypeMethodDescriptionvoidAccepts a visitor.copy(ConstantPool constantPool) Creates a deep copy of this attribute.final voiddump(DataOutputStream file) Dumps bootstrap methods attribute to file stream in binary format.final BootstrapMethod[]Gets the array of bootstrap method records.iterator()final voidsetBootstrapMethods(BootstrapMethod[] bootstrapMethods) Sets the bootstrap methods.final StringtoString()Methods inherited from class Attribute
addAttributeReader, addAttributeReader, clone, getConstantPool, getLength, getName, getNameIndex, getTag, println, readAttribute, readAttribute, removeAttributeReader, setConstantPool, setLength, setNameIndexMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
BootstrapMethods
Initialize from another object. Note that both objects use the same references (shallow copy). Use clone() for a physical copy.- Parameters:
c- Source to copy.
-
BootstrapMethods
public BootstrapMethods(int nameIndex, int length, BootstrapMethod[] bootstrapMethods, ConstantPool constantPool) Constructs a BootstrapMethods attribute.- Parameters:
nameIndex- Index in constant pool to CONSTANT_Utf8.length- Content length in bytes.bootstrapMethods- array of bootstrap methods.constantPool- Array of constants.
-
-
Method Details
-
accept
-
copy
Creates a deep copy of this attribute. -
dump
Dumps bootstrap methods attribute to file stream in binary format.- Overrides:
dumpin classAttribute- Parameters:
file- Output file stream.- Throws:
IOException- if an I/O error occurs.
-
getBootstrapMethods
Gets the array of bootstrap method records.- Returns:
- array of bootstrap method records.
-
iterator
- Specified by:
iteratorin interfaceIterable<BootstrapMethod>
-
setBootstrapMethods
Sets the bootstrap methods.- Parameters:
bootstrapMethods- the array of bootstrap methods.
-
toString
-