Class ModuleNode

java.lang.Object
org.objectweb.asm.ModuleVisitor
org.objectweb.asm.tree.ModuleNode

public class ModuleNode extends org.objectweb.asm.ModuleVisitor
A node that represents a module declaration.
  • Field Details

    • name

      public String name
      The fully qualified name (using dots) of this module.
    • access

      public int access
      The module's access flags, among ACC_OPEN, ACC_SYNTHETIC and ACC_MANDATED.
    • version

      public String version
      The version of this module. May be null.
    • mainClass

      public String mainClass
      The internal name of the main class of this module (see Type.getInternalName()). May be null.
    • packages

      public List<String> packages
      The internal name of the packages declared by this module (see Type.getInternalName()). May be null.
    • requires

      public List<ModuleRequireNode> requires
      The dependencies of this module. May be null.
    • exports

      public List<ModuleExportNode> exports
      The packages exported by this module. May be null.
    • opens

      public List<ModuleOpenNode> opens
      The packages opened by this module. May be null.
    • uses

      public List<String> uses
      The internal names of the services used by this module (see Type.getInternalName()). May be null.
    • provides

      public List<ModuleProvideNode> provides
      The services provided by this module. May be null.
  • Constructor Details

    • ModuleNode

      public ModuleNode(String name, int access, String version)
      Constructs a ModuleNode. Subclasses must not use this constructor. Instead, they must use the ModuleNode(int,String,int,String,List,List,List,List,List) version.
      Parameters:
      name - the fully qualified name (using dots) of the module.
      access - the module access flags, among ACC_OPEN, ACC_SYNTHETIC and ACC_MANDATED.
      version - the module version, or null.
      Throws:
      IllegalStateException - If a subclass calls this constructor.
    • ModuleNode

      public ModuleNode(int api, String name, int access, String version, List<ModuleRequireNode> requires, List<ModuleExportNode> exports, List<ModuleOpenNode> opens, List<String> uses, List<ModuleProvideNode> provides)
      Constructs a ModuleNode.
      Parameters:
      api - the ASM API version implemented by this visitor. Must be one of Opcodes.ASM6, Opcodes.ASM7, Opcodes.ASM8 or Opcodes.ASM9.
      name - the fully qualified name (using dots) of the module.
      access - the module access flags, among ACC_OPEN, ACC_SYNTHETIC and ACC_MANDATED.
      version - the module version, or null.
      requires - The dependencies of this module. May be null.
      exports - The packages exported by this module. May be null.
      opens - The packages opened by this module. May be null.
      uses - The internal names of the services used by this module (see Type.getInternalName()). May be null.
      provides - The services provided by this module. May be null.
  • Method Details

    • visitMainClass

      public void visitMainClass(String mainClass)
      Overrides:
      visitMainClass in class org.objectweb.asm.ModuleVisitor
    • visitPackage

      public void visitPackage(String packaze)
      Overrides:
      visitPackage in class org.objectweb.asm.ModuleVisitor
    • visitRequire

      public void visitRequire(String module, int access, String version)
      Overrides:
      visitRequire in class org.objectweb.asm.ModuleVisitor
    • visitExport

      public void visitExport(String packaze, int access, String... modules)
      Overrides:
      visitExport in class org.objectweb.asm.ModuleVisitor
    • visitOpen

      public void visitOpen(String packaze, int access, String... modules)
      Overrides:
      visitOpen in class org.objectweb.asm.ModuleVisitor
    • visitUse

      public void visitUse(String service)
      Overrides:
      visitUse in class org.objectweb.asm.ModuleVisitor
    • visitProvide

      public void visitProvide(String service, String... providers)
      Overrides:
      visitProvide in class org.objectweb.asm.ModuleVisitor
    • visitEnd

      public void visitEnd()
      Overrides:
      visitEnd in class org.objectweb.asm.ModuleVisitor
    • accept

      public void accept(org.objectweb.asm.ClassVisitor classVisitor)
      Makes the given class visitor visit this module.
      Parameters:
      classVisitor - a class visitor.