Package org.objectweb.asm.tree
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 Summary
FieldsModifier and TypeFieldDescriptionintThe module's access flags, amongACC_OPEN,ACC_SYNTHETICandACC_MANDATED.The packages exported by this module.The internal name of the main class of this module (seeType.getInternalName()).The fully qualified name (using dots) of this module.The packages opened by this module.The internal name of the packages declared by this module (seeType.getInternalName()).The services provided by this module.The dependencies of this module.The internal names of the services used by this module (seeType.getInternalName()).The version of this module.Fields inherited from class org.objectweb.asm.ModuleVisitor
api, mv -
Constructor Summary
ConstructorsConstructorDescriptionModuleNode(int api, String name, int access, String version, List<ModuleRequireNode> requires, List<ModuleExportNode> exports, List<ModuleOpenNode> opens, List<String> uses, List<ModuleProvideNode> provides) Constructs aModuleNode.ModuleNode(String name, int access, String version) Constructs aModuleNode. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(org.objectweb.asm.ClassVisitor classVisitor) Makes the given class visitor visit this module.voidvisitEnd()voidvisitExport(String packaze, int access, String... modules) voidvisitMainClass(String mainClass) voidvoidvisitPackage(String packaze) voidvisitProvide(String service, String... providers) voidvisitRequire(String module, int access, String version) voidMethods inherited from class org.objectweb.asm.ModuleVisitor
getDelegate
-
Field Details
-
name
The fully qualified name (using dots) of this module. -
access
public int accessThe module's access flags, amongACC_OPEN,ACC_SYNTHETICandACC_MANDATED. -
version
The version of this module. May be null. -
mainClass
The internal name of the main class of this module (seeType.getInternalName()). May be null. -
packages
The internal name of the packages declared by this module (seeType.getInternalName()). May be 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 (seeType.getInternalName()). May be null. -
provides
The services provided by this module. May be null.
-
-
Constructor Details
-
ModuleNode
Constructs aModuleNode. Subclasses must not use this constructor. Instead, they must use theModuleNode(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, amongACC_OPEN,ACC_SYNTHETICandACC_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 aModuleNode.- Parameters:
api- the ASM API version implemented by this visitor. Must be one ofOpcodes.ASM6,Opcodes.ASM7,Opcodes.ASM8orOpcodes.ASM9.name- the fully qualified name (using dots) of the module.access- the module access flags, amongACC_OPEN,ACC_SYNTHETICandACC_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 (seeType.getInternalName()). May be null.provides- The services provided by this module. May be null.
-
-
Method Details
-
visitMainClass
- Overrides:
visitMainClassin classorg.objectweb.asm.ModuleVisitor
-
visitPackage
- Overrides:
visitPackagein classorg.objectweb.asm.ModuleVisitor
-
visitRequire
- Overrides:
visitRequirein classorg.objectweb.asm.ModuleVisitor
-
visitExport
- Overrides:
visitExportin classorg.objectweb.asm.ModuleVisitor
-
visitOpen
- Overrides:
visitOpenin classorg.objectweb.asm.ModuleVisitor
-
visitUse
- Overrides:
visitUsein classorg.objectweb.asm.ModuleVisitor
-
visitProvide
- Overrides:
visitProvidein classorg.objectweb.asm.ModuleVisitor
-
visitEnd
public void visitEnd()- Overrides:
visitEndin classorg.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.
-