Class ModuleInfoCreator


  • public class ModuleInfoCreator
    extends java.lang.Object
    • Field Detail

      • NO_STRINGS

        private static final java.lang.String[] NO_STRINGS
      • moduleInfoYml

        private java.nio.file.Path moduleInfoYml
      • outputDirectory

        private java.nio.file.Path outputDirectory
      • classesPaths

        private java.util.List<java.nio.file.Path> classesPaths
      • moduleName

        private java.lang.String moduleName
      • moduleVersion

        private java.lang.String moduleVersion
      • addMandatory

        private boolean addMandatory
      • addPackages

        private boolean addPackages
      • addExports

        private boolean addExports
      • detectUses

        private boolean detectUses
      • detectProvides

        private boolean detectProvides
      • detectVersion

        private boolean detectVersion
      • help

        private boolean help
      • defaultModuleName

        private java.lang.String defaultModuleName
      • detectedClassPathProvides

        final java.util.Map<java.lang.String,​java.util.List<java.lang.String>> detectedClassPathProvides
      • detectedClassPathUsesNames

        final java.util.Set<java.lang.String> detectedClassPathUsesNames
      • detectedClassPathPackages

        final java.util.Set<java.lang.String> detectedClassPathPackages
      • detectedClassPathVersion

        java.lang.String detectedClassPathVersion
      • detectedClassPathAutoModuleName

        java.lang.String detectedClassPathAutoModuleName
    • Constructor Detail

      • ModuleInfoCreator

        public ModuleInfoCreator()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException,
                                javax.xml.stream.XMLStreamException
        Throws:
        java.io.IOException
        javax.xml.stream.XMLStreamException
      • getModuleInfoYml

        public java.nio.file.Path getModuleInfoYml()
      • setModuleInfoYml

        public ModuleInfoCreator setModuleInfoYml​(java.nio.file.Path moduleInfoYml)
      • getOutputDirectory

        public java.nio.file.Path getOutputDirectory()
      • setOutputDirectory

        public ModuleInfoCreator setOutputDirectory​(java.nio.file.Path outputDirectory)
      • getClassesPaths

        public java.util.List<java.nio.file.Path> getClassesPaths()
      • setClassesPaths

        public ModuleInfoCreator setClassesPaths​(java.util.List<java.nio.file.Path> classesPaths)
      • isAddPackages

        public boolean isAddPackages()
      • isAddMandatory

        public boolean isAddMandatory()
      • setAddMandatory

        public ModuleInfoCreator setAddMandatory​(boolean addMandatory)
      • isAddExports

        public boolean isAddExports()
      • isDetectUses

        public boolean isDetectUses()
      • isDetectProvides

        public boolean isDetectProvides()
      • setDetectProvides

        public ModuleInfoCreator setDetectProvides​(boolean detectProvides)
      • getModuleVersion

        public java.lang.String getModuleVersion()
      • setModuleVersion

        public ModuleInfoCreator setModuleVersion​(java.lang.String moduleVersion)
      • getModuleName

        public java.lang.String getModuleName()
      • setModuleName

        public ModuleInfoCreator setModuleName​(java.lang.String moduleName)
      • getDefaultModuleName

        public java.lang.String getDefaultModuleName()
      • setDefaultModuleName

        public void setDefaultModuleName​(java.lang.String moduleName)
      • isDetectVersion

        public boolean isDetectVersion()
      • setDetectVersion

        public ModuleInfoCreator setDetectVersion​(boolean detectVersion)
      • run

        public void run()
                 throws java.io.IOException,
                        javax.xml.stream.XMLStreamException
        Throws:
        java.io.IOException
        javax.xml.stream.XMLStreamException
      • processAnnotation

        private void processAnnotation​(org.objectweb.asm.ClassVisitor cv,
                                       ModuleAnnotation annotation)
      • processAnnotation

        private void processAnnotation​(ModuleAnnotation annotation,
                                       org.objectweb.asm.AnnotationVisitor annotationVisitor)
      • processAnnotationValue

        private void processAnnotationValue​(ModuleAnnotation annotation,
                                            org.objectweb.asm.AnnotationVisitor visitor,
                                            java.lang.String name,
                                            java.lang.Object value)
      • processAnnotationValues

        private void processAnnotationValues​(ModuleAnnotation annotation,
                                             org.objectweb.asm.AnnotationVisitor visitor,
                                             java.util.List<?> list)
      • isClassFile

        private boolean isClassFile​(java.nio.file.Path path)
      • isMetaInf

        private boolean isMetaInf​(java.nio.file.Path path)
      • isVersionDirectory

        private boolean isVersionDirectory​(java.nio.file.Path path)
      • isInt

        private boolean isInt​(java.lang.String str)
      • isManifest

        private boolean isManifest​(java.nio.file.Path path)
      • isMetaInfServices

        private boolean isMetaInfServices​(java.nio.file.Path path)
      • isMetaInfProviders

        private boolean isMetaInfProviders​(java.nio.file.Path path)
      • readClassPathItem

        void readClassPathItem​(java.nio.file.Path basePath,
                               java.nio.file.Path path)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • readClassPathFile

        void readClassPathFile​(java.nio.file.Path basePath,
                               java.nio.file.Path path)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • readClassPathServicesFile

        private void readClassPathServicesFile​(java.nio.file.Path basePath,
                                               java.nio.file.Path path)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • readClassPathProvidersFile

        private void readClassPathProvidersFile​(java.nio.file.Path basePath,
                                                java.nio.file.Path path)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • readClassPathManifest

        private void readClassPathManifest​(java.nio.file.Path basePath,
                                           java.nio.file.Path path)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • readClassPathClassFile

        private void readClassPathClassFile​(java.nio.file.Path basePath,
                                            java.nio.file.Path path)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • newList

        private static <T> java.util.List<T> newList​(java.lang.Object ignored)
      • newLinkedHashSet

        private static <E> java.util.Set<E> newLinkedHashSet​(java.lang.Object ignored)