Package io.github.dmlloyd.moduleinfo
Class ModuleInfoCreator
java.lang.Object
io.github.dmlloyd.moduleinfo.ModuleInfoCreator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
private boolean
(package private) static final int
private String
(package private) String
(package private) String
private boolean
private boolean
private boolean
private boolean
private Path
private String
private String
private static final String[]
private Path
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
private boolean
isClassFile
(Path path) boolean
boolean
boolean
private boolean
private boolean
isManifest
(Path path) private boolean
private boolean
isMetaInfProviders
(Path path) private boolean
isMetaInfServices
(Path path) private boolean
isVersionDirectory
(Path path) static void
private static <E> Set
<E> newLinkedHashSet
(Object ignored) private static <T> List
<T> private void
processAnnotation
(ModuleAnnotation annotation, org.objectweb.asm.AnnotationVisitor annotationVisitor) private void
processAnnotation
(org.objectweb.asm.ClassVisitor cv, ModuleAnnotation annotation) private void
processAnnotationValue
(ModuleAnnotation annotation, org.objectweb.asm.AnnotationVisitor visitor, String name, Object value) private void
processAnnotationValues
(ModuleAnnotation annotation, org.objectweb.asm.AnnotationVisitor visitor, List<?> list) private void
readClassPathClassFile
(Path basePath, Path path) (package private) void
readClassPathFile
(Path basePath, Path path) (package private) void
readClassPathItem
(Path basePath, Path path) private void
readClassPathManifest
(Path basePath, Path path) private void
readClassPathProvidersFile
(Path basePath, Path path) private void
readClassPathServicesFile
(Path basePath, Path path) void
run()
setAddExports
(boolean addExports) setAddMandatory
(boolean addMandatory) setAddPackages
(boolean addPackages) setClassesPaths
(List<Path> classesPaths) void
setDefaultModuleName
(String moduleName) setDetectProvides
(boolean detectProvides) setDetectUses
(boolean detectUses) setDetectVersion
(boolean detectVersion) setModuleInfoYml
(Path moduleInfoYml) setModuleName
(String moduleName) setModuleVersion
(String moduleVersion) setOutputDirectory
(Path outputDirectory)
-
Field Details
-
ASM_VERSION
static final int ASM_VERSION- See Also:
-
NO_STRINGS
-
moduleInfoYml
-
outputDirectory
-
classesPaths
-
moduleName
-
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
-
detectedClassPathProvides
-
detectedClassPathUsesNames
-
detectedClassPathPackages
-
detectedClassPathVersion
String detectedClassPathVersion -
detectedClassPathAutoModuleName
String detectedClassPathAutoModuleName
-
-
Constructor Details
-
ModuleInfoCreator
public ModuleInfoCreator()
-
-
Method Details
-
main
- Throws:
IOException
XMLStreamException
-
getModuleInfoYml
-
setModuleInfoYml
-
getOutputDirectory
-
setOutputDirectory
-
getClassesPaths
-
setClassesPaths
-
isAddPackages
public boolean isAddPackages() -
setAddPackages
-
isAddMandatory
public boolean isAddMandatory() -
setAddMandatory
-
isAddExports
public boolean isAddExports() -
setAddExports
-
isDetectUses
public boolean isDetectUses() -
setDetectUses
-
isDetectProvides
public boolean isDetectProvides() -
setDetectProvides
-
getModuleVersion
-
setModuleVersion
-
getModuleName
-
setModuleName
-
getDefaultModuleName
-
setDefaultModuleName
-
isDetectVersion
public boolean isDetectVersion() -
setDetectVersion
-
run
- Throws:
IOException
XMLStreamException
-
processAnnotation
-
processAnnotation
private void processAnnotation(ModuleAnnotation annotation, org.objectweb.asm.AnnotationVisitor annotationVisitor) -
processAnnotationValue
private void processAnnotationValue(ModuleAnnotation annotation, org.objectweb.asm.AnnotationVisitor visitor, String name, Object value) -
processAnnotationValues
private void processAnnotationValues(ModuleAnnotation annotation, org.objectweb.asm.AnnotationVisitor visitor, List<?> list) -
isClassFile
-
isMetaInf
-
isVersionDirectory
-
isInt
-
isManifest
-
isMetaInfServices
-
isMetaInfProviders
-
readClassPathItem
- Throws:
IOException
-
readClassPathFile
- Throws:
IOException
-
readClassPathServicesFile
- Throws:
IOException
-
readClassPathProvidersFile
- Throws:
IOException
-
readClassPathManifest
- Throws:
IOException
-
readClassPathClassFile
- Throws:
IOException
-
newList
-
newLinkedHashSet
-