Top Description Fields Constructors Methods
org.apache.bcel.classfile

public final Class ConstantDynamic

extends ConstantCP
Class Inheritance
Imports
java.io.DataInput, .IOException, org.apache.bcel.Const

This class is derived from the abstract Constant and represents a reference to a dynamically computed constant.
Since
6.3
See Also
Constant, Change request for JEP 309

Field Summary

Inherited from org.apache.bcel.classfile.ConstantCP:
class_indexname_and_type_index

Constructor Summary

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

Initialize from another object.

pack-priv
ConstantDynamic(final DataInput
Input stream
file
)

Initialize instance from file data.

public
ConstantDynamic(final int bootstrapMethodAttrIndex, final int nameAndTypeIndex)

Method Summary

Modifier and TypeMethod and Description
public void
accept(final Visitor
Visitor object
v
)

Implements abstract org.apache.bcel.classfile.Constant.accept.

Implements org.apache.bcel.classfile.Node.accept.

Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class.
public int

Returns:

Reference (index) to bootstrap method this constant refers to. Note that this method is a functional duplicate of getClassIndex for use by ConstantInvokeDynamic.
getBootstrapMethodAttrIndex
()

public String

Returns:

String representation
toString
()

Overrides org.apache.bcel.classfile.ConstantCP.toString.

Returns a string representation of the object.
Inherited from org.apache.bcel.classfile.ConstantCP:
dumpgetClassgetClassIndexgetNameAndTypeIndexsetClassIndexsetNameAndTypeIndex

Constructor Detail

ConstantDynamicback to summary
public ConstantDynamic(final ConstantDynamic c)

Initialize from another object.

Parameters
c:ConstantDynamic

Source to copy.

ConstantDynamicback to summary
pack-priv ConstantDynamic(final DataInput file) throws IOException

Initialize instance from file data.

Parameters
file:DataInput

Input stream

Exceptions
IOException:
if an I/O error occurs.
ConstantDynamicback to summary
public ConstantDynamic(final int bootstrapMethodAttrIndex, final int nameAndTypeIndex)

Method Detail

acceptback to summary
public void accept(final Visitor v)

Implements abstract org.apache.bcel.classfile.Constant.accept.

Implements org.apache.bcel.classfile.Node.accept.

Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.

Parameters
v:Visitor

Visitor object

Annotations
@Override
getBootstrapMethodAttrIndexback to summary
public int getBootstrapMethodAttrIndex()
Returns:int

Reference (index) to bootstrap method this constant refers to. Note that this method is a functional duplicate of getClassIndex for use by ConstantInvokeDynamic.

Since
6.0
toStringback to summary
public String toString()

Overrides org.apache.bcel.classfile.ConstantCP.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

String representation

Annotations
@Override