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

public final Class ModuleProvides

extends Object
implements Cloneable, Node
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.bcel.internal.classfile.Node, java.lang.Cloneable
Imports
java.io.DataInput, .DataOutputStream, .IOException, com.sun.org.apache.bcel.internal.Const

This class represents an entry in the provides table of the Module attribute. Each entry describes a service implementation that the parent module provides.
Since
6.4.0
See Also
Module

Field Summary

Modifier and TypeField and Description
private final int
private final int
private final int[]

Constructor Summary

AccessConstructor and Description
pack-priv
ModuleProvides(final DataInput
Input stream
file
)

Constructs object from file stream.

Method Summary

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

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 ModuleProvides
copy()

Returns: deep copy of this object

public void
dump(final DataOutputStream
Output file stream
file
)

Dump table entry to file stream in binary format.

private static String
getImplementationClassNameAtIndex(final ConstantPool constantPool, final int index, final boolean compactClassName)

public String[]

Returns:

array of implementation class names
getImplementationClassNames
(final ConstantPool
Array of constants usually obtained from the ClassFile object
constantPool
,
final boolean
false for original constant pool value, true to replace '/' with '.'
compactClassName
)

Gets the array of implementation class names for this ModuleProvides.

public String

Returns:

interface name
getInterfaceName
(final ConstantPool
Array of constants usually obtained from the ClassFile object
constantPool
)

Gets the interface name for this ModuleProvides.

public String

Returns:

String representation
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public String
toString(final ConstantPool constantPool)

Returns: Resolved string representation

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

providesIndexback to summary
private final int providesIndex
providesWithCountback to summary
private final int providesWithCount
providesWithIndexback to summary
private final int[] providesWithIndex

Constructor Detail

ModuleProvidesback to summary
pack-priv ModuleProvides(final DataInput file) throws IOException

Constructs object from file stream.

Parameters
file:DataInput

Input stream

Exceptions
IOException:
if an I/O Exception occurs in readUnsignedShort

Method Detail

acceptback to summary
public void accept(final Visitor v)

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
copyback to summary
public ModuleProvides copy()
Returns:ModuleProvides

deep copy of this object

dumpback to summary
public void dump(final DataOutputStream file) throws IOException

Dump table entry to file stream in binary format.

Parameters
file:DataOutputStream

Output file stream

Exceptions
IOException:
if an I/O Exception occurs in writeShort
getImplementationClassNameAtIndexback to summary
private static String getImplementationClassNameAtIndex(final ConstantPool constantPool, final int index, final boolean compactClassName)
getImplementationClassNamesback to summary
public String[] getImplementationClassNames(final ConstantPool constantPool, final boolean compactClassName)

Gets the array of implementation class names for this ModuleProvides.

Parameters
constantPool:ConstantPool

Array of constants usually obtained from the ClassFile object

compactClassName:boolean

false for original constant pool value, true to replace '/' with '.'

Returns:String[]

array of implementation class names

Since
6.10.0
getInterfaceNameback to summary
public String getInterfaceName(final ConstantPool constantPool)

Gets the interface name for this ModuleProvides.

Parameters
constantPool:ConstantPool

Array of constants usually obtained from the ClassFile object

Returns:String

interface name

Since
6.10.0
toStringback to summary
public String toString()

Overrides java.lang.Object.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
toStringback to summary
public String toString(final ConstantPool constantPool)
Returns:String

Resolved string representation