public final class AdmCodeGenerator
extends com.neeve.adm.AdmObject
| Modifier and Type | Class and Description |
|---|---|
class |
AdmCodeGenerator.CodeGenerateEvent
Holds event data for code generation events.
|
static class |
AdmCodeGenerator.CodeGenerateEventType
Code generation steps that external listener can listen for.
|
static interface |
AdmCodeGenerator.CodegenListener
Event listener for code generation events.
|
static class |
AdmCodeGenerator.GenerateParameter
Contains definitions of all parameters of code generator
|
| Modifier and Type | Field and Description |
|---|---|
static com.neeve.build.codegen.CgBuildParameters |
CODEGEN_PARAMS
Holder of code generation parameters
This variable hold the list of parameters that can be supplied to the code generator.
|
| Constructor and Description |
|---|
AdmCodeGenerator()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
generate()
Run code generator
Before running this method, caller should call
setArgument(String, Object) or setArguments(Map)
to set code generation parameters. |
static void |
main(String[] args) |
AdmCodeGenerator |
setArgument(String name,
Object value)
Sets a code generation parameter value
|
void |
setArguments(Map<String,Object> arguments)
Set code generation parameter values
This method sets code generation parameters from a map.
|
getChecked, getThreaded, getTracer, setChecked, setTracerpublic static final com.neeve.build.codegen.CgBuildParameters CODEGEN_PARAMS
This variable hold the list of parameters that can be supplied to the code generator. This list is a union
of code generator params listed in AdmCodeGenerator.GenerateParameter and AdmModel.DIRECTIVE_DEFINITIONS.
Note: This instance should be used as read-only to get available options from code generator. Arguments set directly to it will be ignored.
public final void setArguments(Map<String,Object> arguments)
This method sets code generation parameters from a map. If argument of matching name is already added, it will be overwritten.
arguments - map of parameters to addpublic final AdmCodeGenerator setArgument(String name, Object value)
name - Parameter name.value - Parameter value.AdmCodeGenerator this instance for invocation chainingpublic final void generate()
throws Exception
Before running this method, caller should call setArgument(String, Object) or setArguments(Map)
to set code generation parameters.
Exception - in case of code generation errors such as parse errors, missing files etc.public static final void main(String[] args)
Copyright © 2019 Neeve Research, LLC. All Rights Reserved.