类 ModuleWriter
java.lang.Object
cn.taketoday.bytecode.ModuleVisitor
cn.taketoday.bytecode.ModuleWriter
A
ModuleVisitor that generates the corresponding Module, ModulePackages and
ModuleMainClass attributes, as defined in the Java Virtual Machine Specification (JVMS).- 作者:
- Remi Forax, Eric Bruneton, Harry Yang
- 另请参阅:
-
字段概要
字段修饰符和类型字段说明private final ByteVectorThe binary content of the 'exports' array of the JVMS Module attribute.private intThe exports_count field of the JVMS Module attribute.private intThe main_class_index field of the JVMS ModuleMainClass attribute, or 0.private final intThe module_flags field of the JVMS Module attribute.private final intThe module_name_index field of the JVMS Module attribute.private final intThe module_version_index field of the JVMS Module attribute.private final ByteVectorThe binary content of the 'opens' array of the JVMS Module attribute.private intThe opens_count field of the JVMS Module attribute.private intThe provides_count field of the JVMS ModulePackages attribute.private final ByteVectorThe binary content of the 'package_index' array of the JVMS ModulePackages attribute.private final ByteVectorThe binary content of the 'provides' array of the JVMS Module attribute.private intThe provides_count field of the JVMS Module attribute.private final ByteVectorThe binary content of the 'requires' array of the JVMS Module attribute.private intThe requires_count field of the JVMS Module attribute.private final SymbolTableWhere the constants used in this AnnotationWriter must be stored.private intThe uses_count field of the JVMS Module attribute.private final ByteVectorThe binary content of the 'uses_index' array of the JVMS Module attribute.从类继承的字段 cn.taketoday.bytecode.ModuleVisitor
mv -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明(专用程序包) intReturns the size of the Module, ModulePackages and ModuleMainClass attributes generated by this ModuleWriter.(专用程序包) intReturns the number of Module, ModulePackages and ModuleMainClass attributes generated by this ModuleWriter.(专用程序包) voidputAttributes(ByteVector output) Puts the Module, ModulePackages and ModuleMainClass attributes generated by this ModuleWriter in the given ByteVector.voidvisitEnd()Visits the end of the module.voidvisitExport(String packaze, int access, String... modules) Visit an exported package of the current module.voidvisitMainClass(String mainClass) Visit the main class of the current module.voidVisit an open package of the current module.voidvisitPackage(String packaze) Visit a package of the current module.voidvisitProvide(String service, String... providers) Visit an implementation of a service.voidvisitRequire(String module, int access, String version) Visits a dependence of the current module.voidVisit a service used by the current module.
-
字段详细资料
-
symbolTable
Where the constants used in this AnnotationWriter must be stored. -
moduleNameIndex
private final int moduleNameIndexThe module_name_index field of the JVMS Module attribute. -
moduleFlags
private final int moduleFlagsThe module_flags field of the JVMS Module attribute. -
moduleVersionIndex
private final int moduleVersionIndexThe module_version_index field of the JVMS Module attribute. -
requiresCount
private int requiresCountThe requires_count field of the JVMS Module attribute. -
requires
The binary content of the 'requires' array of the JVMS Module attribute. -
exportsCount
private int exportsCountThe exports_count field of the JVMS Module attribute. -
exports
The binary content of the 'exports' array of the JVMS Module attribute. -
opensCount
private int opensCountThe opens_count field of the JVMS Module attribute. -
opens
The binary content of the 'opens' array of the JVMS Module attribute. -
usesCount
private int usesCountThe uses_count field of the JVMS Module attribute. -
usesIndex
The binary content of the 'uses_index' array of the JVMS Module attribute. -
providesCount
private int providesCountThe provides_count field of the JVMS Module attribute. -
provides
The binary content of the 'provides' array of the JVMS Module attribute. -
packageCount
private int packageCountThe provides_count field of the JVMS ModulePackages attribute. -
packageIndex
The binary content of the 'package_index' array of the JVMS ModulePackages attribute. -
mainClassIndex
private int mainClassIndexThe main_class_index field of the JVMS ModuleMainClass attribute, or 0.
-
-
构造器详细资料
-
ModuleWriter
ModuleWriter(SymbolTable symbolTable, int name, int access, int version)
-
-
方法详细资料
-
visitMainClass
从类复制的说明:ModuleVisitorVisit the main class of the current module.- 覆盖:
visitMainClass在类中ModuleVisitor- 参数:
mainClass- the internal name of the main class of the current module.
-
visitPackage
从类复制的说明:ModuleVisitorVisit a package of the current module.- 覆盖:
visitPackage在类中ModuleVisitor- 参数:
packaze- the internal name of a package.
-
visitRequire
从类复制的说明:ModuleVisitorVisits a dependence of the current module.- 覆盖:
visitRequire在类中ModuleVisitor- 参数:
module- the fully qualified name (using dots) of the dependence.access- the access flag of the dependence amongACC_TRANSITIVE,ACC_STATIC_PHASE,ACC_SYNTHETICandACC_MANDATED.version- the module version at compile time, or null.
-
visitExport
从类复制的说明:ModuleVisitorVisit an exported package of the current module.- 覆盖:
visitExport在类中ModuleVisitor- 参数:
packaze- the internal name of the exported package.access- the access flag of the exported package, valid values are amongACC_SYNTHETICandACC_MANDATED.modules- the fully qualified names (using dots) of the modules that can access the public classes of the exported package, or null.
-
visitOpen
从类复制的说明:ModuleVisitorVisit an open package of the current module.- 覆盖:
visitOpen在类中ModuleVisitor- 参数:
packaze- the internal name of the opened package.access- the access flag of the opened package, valid values are amongACC_SYNTHETICandACC_MANDATED.modules- the fully qualified names (using dots) of the modules that can use deep reflection to the classes of the open package, or null.
-
visitUse
从类复制的说明:ModuleVisitorVisit a service used by the current module. The name must be the internal name of an interface or a class.- 覆盖:
visitUse在类中ModuleVisitor- 参数:
service- the internal name of the service.
-
visitProvide
从类复制的说明:ModuleVisitorVisit an implementation of a service.- 覆盖:
visitProvide在类中ModuleVisitor- 参数:
service- the internal name of the service.providers- the internal names of the implementations of the service (there is at least one provider).
-
visitEnd
public void visitEnd()从类复制的说明:ModuleVisitorVisits the end of the module. This method, which is the last one to be called, is used to inform the visitor that everything have been visited.- 覆盖:
visitEnd在类中ModuleVisitor
-
getAttributeCount
int getAttributeCount()Returns the number of Module, ModulePackages and ModuleMainClass attributes generated by this ModuleWriter.- 返回:
- the number of Module, ModulePackages and ModuleMainClass attributes (between 1 and 3).
-
computeAttributesSize
int computeAttributesSize()Returns the size of the Module, ModulePackages and ModuleMainClass attributes generated by this ModuleWriter. Also add the names of these attributes in the constant pool.- 返回:
- the size in bytes of the Module, ModulePackages and ModuleMainClass attributes.
-
putAttributes
Puts the Module, ModulePackages and ModuleMainClass attributes generated by this ModuleWriter in the given ByteVector.- 参数:
output- where the attributes must be put.
-