Class AbstractGenerator
- java.lang.Object
-
- picocli.codegen.aot.graalvm.processor.AbstractGenerator
-
- All Implemented Interfaces:
IGenerator
- Direct Known Subclasses:
ProxyConfigGen,ReflectConfigGen,ResourceConfigGen
abstract class AbstractGenerator extends java.lang.Object implements IGenerator
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringdisableKeyprivate java.lang.StringfileNamestatic java.lang.StringOPTION_VERBOSEprotected javax.annotation.processing.ProcessingEnvironmentprocessingEnv
-
Constructor Summary
Constructors Constructor Description AbstractGenerator(javax.annotation.processing.ProcessingEnvironment processingEnv, java.lang.String fileName, java.lang.String disableKey)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringcreateRelativePath(java.lang.String fileName)protected booleanenabled()protected voidfatalError(java.lang.String msg)Prints a compile-time error message prefixed with "FATAL ERROR".protected java.lang.StringfileName()voidgenerate(java.util.Map<javax.lang.model.element.Element,CommandLine.Model.CommandSpec> allCommands)protected java.lang.StringgenerateConfig(java.util.Map<javax.lang.model.element.Element,CommandLine.Model.CommandSpec> allCommands)protected abstract java.lang.StringgenerateConfig(CommandLine.Model.CommandSpec[] commands)protected voidlogInfo(java.lang.String msg)Prints a compile-time NOTE message.
-
-
-
Field Detail
-
OPTION_VERBOSE
public static final java.lang.String OPTION_VERBOSE
- See Also:
- Constant Field Values
-
processingEnv
protected final javax.annotation.processing.ProcessingEnvironment processingEnv
-
fileName
private final java.lang.String fileName
-
disableKey
private final java.lang.String disableKey
-
-
Method Detail
-
generateConfig
protected abstract java.lang.String generateConfig(CommandLine.Model.CommandSpec[] commands) throws java.lang.Exception
- Throws:
java.lang.Exception
-
generate
public void generate(java.util.Map<javax.lang.model.element.Element,CommandLine.Model.CommandSpec> allCommands)
- Specified by:
generatein interfaceIGenerator
-
enabled
protected boolean enabled()
-
fileName
protected java.lang.String fileName()
-
createRelativePath
protected java.lang.String createRelativePath(java.lang.String fileName)
-
generateConfig
protected java.lang.String generateConfig(java.util.Map<javax.lang.model.element.Element,CommandLine.Model.CommandSpec> allCommands) throws java.lang.Exception
- Throws:
java.lang.Exception
-
logInfo
protected void logInfo(java.lang.String msg)
Prints a compile-time NOTE message.- Parameters:
msg- the info message
-
fatalError
protected void fatalError(java.lang.String msg)
Prints a compile-time error message prefixed with "FATAL ERROR".- Parameters:
msg- the error message with optional format specifiers
-
-