Class JavassistModuleHelper

java.lang.Object
com.github.javaparser.symbolsolver.utils.JavassistModuleHelper

public class JavassistModuleHelper extends Object
  • Field Details

  • Constructor Details

    • JavassistModuleHelper

      public JavassistModuleHelper()
  • Method Details

    • getModuleWithExportedPackages

      public static Optional<com.github.javaparser.utils.Pair<String, List<String>>> getModuleWithExportedPackages(javassist.CtClass moduleInfo)
      Javassist does not provide support for modules beyond letting users fetch the module attribute byte array, so the attribute needs to be parsed manually. This is done according to The JVM Spec for the module attribute.
      Parameters:
      moduleInfo - the CtClass for module-info.class
      Returns:
      a pair of [ModuleName, ExportedPackageNames] if the module attribute is not empty.