Class ModuleExports

java.lang.Object
org.apache.bcel.classfile.ModuleExports
All Implemented Interfaces:
Cloneable, Node

public final class ModuleExports extends Object implements Cloneable, Node
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:
  • Method Details

    • accept

      public void accept(Visitor v)
      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.
      Specified by:
      accept in interface Node
      Parameters:
      v - Visitor object
    • copy

      public ModuleExports copy()
      Returns:
      deep copy of this object
    • dump

      public void dump(DataOutputStream file) throws IOException
      Dump table entry to file stream in binary format.
      Parameters:
      file - Output file stream
      Throws:
      IOException - if an I/O Exception occurs in writeShort
    • getExportsFlags

      public int getExportsFlags()
      Gets the flags for this ModuleExports.
      Returns:
      the exportsFlags
      Since:
      6.10.0
    • getPackageName

      public String getPackageName(ConstantPool constantPool)
      Gets the exported package name.
      Parameters:
      constantPool - the constant pool from the ClassFile
      Returns:
      the exported package name
      Since:
      6.10.0
    • getToModuleNames

      public String[] getToModuleNames(ConstantPool constantPool)
      Gets an array of module names for this ModuleExports.
      Parameters:
      constantPool - Array of constants usually obtained from the ClassFile object
      Returns:
      array of module names following 'exports to'
      Since:
      6.10.0
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      String representation
    • toString

      public String toString(ConstantPool constantPool)
      Returns:
      Resolved string representation