Module de.carne.mcd.jvmdecoder
Class ModuleInfoElement
- java.lang.Object
-
- de.carne.mcd.jvmdecoder.classfile.ClassInfoElement
-
- de.carne.mcd.jvmdecoder.classfile.attribute.module.ModuleInfoElement
-
- All Implemented Interfaces:
Printable
public abstract class ModuleInfoElement extends ClassInfoElement
A single module-info element.
-
-
Field Summary
-
Fields inherited from class de.carne.mcd.jvmdecoder.classfile.ClassInfoElement
classInfo
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ModuleInfoElementexports(ClassInfo classInfo, int exportsIndex, int exportsFlags, int[] exportsToIndexes)Constructs a "exports" module-info element.static ModuleInfoElementopens(ClassInfo classInfo, int opensIndex, int opensFlags, int[] opensToIndexes)Constructs a "opens" module-info element.static ModuleInfoElementprovides(ClassInfo classInfo, int providesIndex, int[] providesWithIndexes)Constructs a "provides" module-info element.static ModuleInfoElementrequires(ClassInfo classInfo, int requiresIndex, int requiresFlags, int requiresVersionIndex)Constructs a "requires" module-info element.static ModuleInfoElementuses(ClassInfo classInfo, int usesIndex)Constructs a "uses" module-info element.
-
-
-
Method Detail
-
requires
public static ModuleInfoElement requires(ClassInfo classInfo, int requiresIndex, int requiresFlags, int requiresVersionIndex)
Constructs a "requires" module-info element.- Parameters:
classInfo- the ClassInfo instance this element is part of.requiresIndex- the required module's name index.requiresFlags- the requires flags.requiresVersionIndex- the required module's version index.- Returns:
- the created module-info element.
-
exports
public static ModuleInfoElement exports(ClassInfo classInfo, int exportsIndex, int exportsFlags, int[] exportsToIndexes)
Constructs a "exports" module-info element.- Parameters:
classInfo- the ClassInfo instance this element is part of.exportsIndex- the exported packages's name index.exportsFlags- the exports flags.exportsToIndexes- the name indexes of the modules to export to.- Returns:
- the created module-info element.
-
opens
public static ModuleInfoElement opens(ClassInfo classInfo, int opensIndex, int opensFlags, int[] opensToIndexes)
Constructs a "opens" module-info element.- Parameters:
classInfo- the ClassInfo instance this element is part of.opensIndex- the opened packages's name index.opensFlags- the opens flags.opensToIndexes- the name indexes of the modules to open to.- Returns:
- the created module-info element.
-
uses
public static ModuleInfoElement uses(ClassInfo classInfo, int usesIndex)
Constructs a "uses" module-info element.- Parameters:
classInfo- the ClassInfo instance this element is part of.usesIndex- the used class' name index.- Returns:
- the created module-info element.
-
provides
public static ModuleInfoElement provides(ClassInfo classInfo, int providesIndex, int[] providesWithIndexes)
Constructs a "provides" module-info element.- Parameters:
classInfo- the ClassInfo instance this element is part of.providesIndex- the provided class' name index.providesWithIndexes- the name indexes of the providing classes.- Returns:
- the created module-info element.
-
-