APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.bcel.internal.classfile

public final Class ConstantDynamic

extends ConstantCP
Class Inheritance
Imports
java.io.DataInput, .IOException, com.sun.org.apache.bcel.internal.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 com.sun.org.apache.bcel.internal.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 com.sun.org.apache.bcel.internal.classfile.Constant.accept.

Implements com.sun.org.apache.bcel.internal.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
getBootstrapMethodAttrIndex()

Returns: Reference (index) to bootstrap method this constant refers to.

public String

Returns:

String representation
toString
()

Overrides com.sun.org.apache.bcel.internal.classfile.ConstantCP.toString.

Returns a string representation of the object.

Inherited from com.sun.org.apache.bcel.internal.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 com.sun.org.apache.bcel.internal.classfile.Constant.accept.

Implements com.sun.org.apache.bcel.internal.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 com.sun.org.apache.bcel.internal.classfile.ConstantCP.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

String representation

Annotations
@Override