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
Defines all parameters of codegenerator which is a union of code generator params listed in
AdmCodeGenerator.GenerateParameter and AdmModel.DIRECTIVE_DEFINITIONS . |
Constructor and Description |
---|
AdmCodeGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
generate()
Runs code generation after validating input arguments.
|
static void |
main(String[] args) |
AdmCodeGenerator |
setArgument(String name,
Object value)
Sets argument for code generation.
|
void |
setArguments(Map<String,Object> arguments)
Adds all arguments from supplied map.
|
getChecked, getThreaded, getTracer, setChecked, setTracer
public static final com.neeve.build.codegen.CgBuildParameters CODEGEN_PARAMS
AdmCodeGenerator.GenerateParameter
and AdmModel.DIRECTIVE_DEFINITIONS
.
This instance should be used as read-only to get available options from code generator. Arguments set directly to it will be ignored.public void setArguments(Map<String,Object> arguments)
arguments
- map of argumentspublic AdmCodeGenerator setArgument(String name, Object value)
name
- Parameter name.value
- Argument value.AdmCodeGenerator
instance for which method is called.public void generate() throws Exception
setArgument(String, Object)
or setArguments(Map)
to set values of all input parameters.Exception
- in case of code generation errors such as parse errors, missing files etc.public static void main(String[] args)
Copyright © 2019 Neeve Research, LLC. All Rights Reserved.