Class ModuleInfoElement

  • All Implemented Interfaces:
    Printable

    public abstract class ModuleInfoElement
    extends ClassInfoElement
    A single module-info element.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ModuleInfoElement exports​(ClassInfo classInfo, int exportsIndex, int exportsFlags, int[] exportsToIndexes)
      Constructs a "exports" module-info element.
      static ModuleInfoElement opens​(ClassInfo classInfo, int opensIndex, int opensFlags, int[] opensToIndexes)
      Constructs a "opens" module-info element.
      static ModuleInfoElement provides​(ClassInfo classInfo, int providesIndex, int[] providesWithIndexes)
      Constructs a "provides" module-info element.
      static ModuleInfoElement requires​(ClassInfo classInfo, int requiresIndex, int requiresFlags, int requiresVersionIndex)
      Constructs a "requires" module-info element.
      static ModuleInfoElement uses​(ClassInfo classInfo, int usesIndex)
      Constructs a "uses" module-info element.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface de.carne.mcd.jvmdecoder.classfile.Printable

        print
    • 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.