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 TypeFieldDescriptionint
The module's access flags, amongACC_OPEN
,ACC_SYNTHETIC
andACC_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 TypeMethodDescriptionvoid
accept
(org.objectweb.asm.ClassVisitor classVisitor) Makes the given class visitor visit this module.void
visitEnd()
void
visitExport
(String packaze, int access, String... modules) void
visitMainClass
(String mainClass) void
void
visitPackage
(String packaze) void
visitProvide
(String service, String... providers) void
visitRequire
(String module, int access, String version) void
Methods 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_SYNTHETIC
andACC_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_SYNTHETIC
andACC_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.ASM8
orOpcodes.ASM9
.name
- the fully qualified name (using dots) of the module.access
- the module access flags, amongACC_OPEN
,ACC_SYNTHETIC
andACC_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:
visitMainClass
in classorg.objectweb.asm.ModuleVisitor
-
visitPackage
- Overrides:
visitPackage
in classorg.objectweb.asm.ModuleVisitor
-
visitRequire
- Overrides:
visitRequire
in classorg.objectweb.asm.ModuleVisitor
-
visitExport
- Overrides:
visitExport
in classorg.objectweb.asm.ModuleVisitor
-
visitOpen
- Overrides:
visitOpen
in classorg.objectweb.asm.ModuleVisitor
-
visitUse
- Overrides:
visitUse
in classorg.objectweb.asm.ModuleVisitor
-
visitProvide
- Overrides:
visitProvide
in classorg.objectweb.asm.ModuleVisitor
-
visitEnd
public void visitEnd()- Overrides:
visitEnd
in 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.
-