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

public final Class ModuleExports

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 exports table of the Module attribute. Each entry describes a package which may open the parent module.
Since
6.4.0
See Also
Module

Field Summary

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

Constructor Summary

AccessConstructor and Description
pack-priv
ModuleExports(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 ModuleExports
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.

public int

Returns:

the exportsFlags
getExportsFlags
()

Gets the flags for this ModuleExports.

public String

Returns:

the exported package name
getPackageName
(final ConstantPool
the constant pool from the ClassFile
constantPool
)

Gets the exported package name.

private static String
getToModuleNameAtIndex(final ConstantPool constantPool, final int index)

public String[]

Returns:

array of module names following 'exports to'
getToModuleNames
(final ConstantPool
Array of constants usually obtained from the ClassFile object
constantPool
)

Gets an array of module names for this ModuleExports.

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

exportsFlagsback to summary
private final int exportsFlags
exportsIndexback to summary
private final int exportsIndex
exportsToCountback to summary
private final int exportsToCount
exportsToIndexback to summary
private final int[] exportsToIndex

Constructor Detail

ModuleExportsback to summary
pack-priv ModuleExports(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 ModuleExports copy()
Returns:ModuleExports

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
getExportsFlagsback to summary
public int getExportsFlags()

Gets the flags for this ModuleExports.

Returns:int

the exportsFlags

Since
6.10.0
getPackageNameback to summary
public String getPackageName(final ConstantPool constantPool)

Gets the exported package name.

Parameters
constantPool:ConstantPool

the constant pool from the ClassFile

Returns:String

the exported package name

Since
6.10.0
getToModuleNameAtIndexback to summary
private static String getToModuleNameAtIndex(final ConstantPool constantPool, final int index)
getToModuleNamesback to summary
public String[] getToModuleNames(final ConstantPool constantPool)

Gets an array of module names for this ModuleExports.

Parameters
constantPool:ConstantPool

Array of constants usually obtained from the ClassFile object

Returns:String[]

array of module names following 'exports to'

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