public class CompileEnvironment extends Object
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
CompileEnvironment.Support
Represents kind of supported features in  
CompileEnvironment. | 
| Constructor and Description | 
|---|
CompileEnvironment(ProcessingEnvironment processingEnvironment,
                  List<? extends OperatorDriver> operatorDrivers,
                  List<? extends DataModelMirrorRepository> dataModelMirrors)
Creates a new instance. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
emit(CompilationUnit unit,
    Element... originatingElements)
Emits the target compilation unit onto suitable location. 
 | 
DataModelMirror | 
findDataModel(ClassDescription typeName)
Returns data-model mirror. 
 | 
DataModelMirror | 
findDataModel(TypeMirror type)
Returns data-model mirror. 
 | 
DeclaredType | 
findDeclaredType(ClassDescription aClass)
Returns the type mirror witch has the specified qualified name. 
 | 
OperatorDriver | 
findDriver(TypeElement annotationType)
Returns a registered operator driver related to the annotation type. 
 | 
TypeElement | 
findTypeElement(ClassDescription aClass)
Returns the type element which has the specified qualified name. 
 | 
TypeMirror | 
getErasure(TypeMirror type)
Returns the type erasure. 
 | 
String | 
getMemberName(String token)
Returns the normalized member name. 
 | 
List<OperatorDriver> | 
getOperatorDrivers()
Returns registered operator drivers. 
 | 
ProcessingEnvironment | 
getProcessingEnvironment()
Returns the current processing environment. 
 | 
WarningAction | 
getWarningAction()
Returns the warning action type. 
 | 
boolean | 
isEnumConstantParameter()
Returns whether or not the operators can accept enum constants as value parameter. 
 | 
boolean | 
isFlowpartExternalIo()
Returns whether external I/O declaration is available in flow-parts or not. 
 | 
boolean | 
isForceGenerateImplementation()
Returns whether always generates implementation classes or not. 
 | 
boolean | 
isForceNormalizeMemberName()
Returns whether or not the member names must be normalized. 
 | 
boolean | 
isForceRegenerateResources()
Returns whether always re-generates resources or not. 
 | 
boolean | 
isResourceGenerated(ClassDescription key)
Returns whether the target resources is generated or not. 
 | 
boolean | 
isStrictOperatorParameterOrder()
Returns whether the operator method parameter must be strict ordered or not. 
 | 
boolean | 
isStrictOptionalOutputConnectivity()
Returns whether or not the operator outputs must not be opened even if they are optional. 
 | 
boolean | 
isUnboundProjection()
Returns whether or not the operators can accept unbound projective models. 
 | 
static CompileEnvironment | 
newInstance(ProcessingEnvironment processingEnvironment,
           ClassLoader serviceLoader,
           CompileEnvironment.Support... features)
Creates a new instance. 
 | 
static CompileEnvironment | 
newInstance(ProcessingEnvironment processingEnvironment,
           CompileEnvironment.Support... features)
Creates a new instance. 
 | 
void | 
setResourceGenerated(ClassDescription key)
Sets the target resources is generated. 
 | 
CompileEnvironment | 
withEnumConstantParameter(boolean newValue)
Sets whether or not the operators can accept enum constants as value parameter. 
 | 
CompileEnvironment | 
withFlowpartExternalIo(boolean newValue)
Sets whether external I/O declarations are available in flow-parts or not. 
 | 
CompileEnvironment | 
withForceGenerateImplementation(boolean newValue)
Sets whether always generates implementation classes or not. 
 | 
CompileEnvironment | 
withForceNormalizeMemberName(boolean newValue)
Sets whether or not the member names must be normalized. 
 | 
CompileEnvironment | 
withForceRegenerateResources(boolean newValue)
Sets whether always re-generates resources. 
 | 
CompileEnvironment | 
withStrictOperatorParameterOrder(boolean newValue)
Sets whether the operator method parameter must be strict ordered or not. 
 | 
CompileEnvironment | 
withStrictOptionalOutputConnectivity(boolean newValue)
Sets whether or not the operator outputs must not be opened even if they are optional. 
 | 
CompileEnvironment | 
withUnboundProjection(boolean newValue)
Sets whether or not the operators can accept unbound projective models. 
 | 
CompileEnvironment | 
withWarningAction(WarningAction newValue)
Sets the warning action type. 
 | 
public CompileEnvironment(ProcessingEnvironment processingEnvironment, List<? extends OperatorDriver> operatorDrivers, List<? extends DataModelMirrorRepository> dataModelMirrors)
processingEnvironment - current annotation processing environmentoperatorDrivers - supported operator driversdataModelMirrors - supported data model mirror repositoriesIllegalArgumentException - if some parameters were nullnewInstance(ProcessingEnvironment, ClassLoader, Support...)public static CompileEnvironment newInstance(ProcessingEnvironment processingEnvironment, CompileEnvironment.Support... features)
processingEnvironment - current annotation processing environment.features - list of supported featuresIllegalArgumentException - if some parameters were nullpublic static CompileEnvironment newInstance(ProcessingEnvironment processingEnvironment, ClassLoader serviceLoader, CompileEnvironment.Support... features)
processingEnvironment - current annotation processing environment.serviceLoader - a class loader to be used for loading services listed in featuresfeatures - list of supported featuresIllegalArgumentException - if some parameters were nullpublic ProcessingEnvironment getProcessingEnvironment()
public void emit(CompilationUnit unit, Element... originatingElements) throws IOException
unit - target compilation unitoriginatingElements - the original elementsIOException - if failed to emit by I/O errorIllegalArgumentException - if some parameters were nullpublic DataModelMirror findDataModel(ClassDescription typeName)
typeName - target type namenull if not foundIllegalArgumentException - if some parameters were nullpublic DataModelMirror findDataModel(TypeMirror type)
type - target type mirrornull if not foundIllegalArgumentException - if some parameters were nullpublic List<OperatorDriver> getOperatorDrivers()
public OperatorDriver findDriver(TypeElement annotationType)
annotationType - target annotation typenull if it is not registeredIllegalArgumentException - if some parameters were nullpublic TypeElement findTypeElement(ClassDescription aClass)
aClass - fully qualified type namenull if it is not foundIllegalArgumentException - if some parameters were nullpublic DeclaredType findDeclaredType(ClassDescription aClass)
aClass - fully qualified type namenull if it is not foundIllegalArgumentException - if some parameters were nullpublic TypeMirror getErasure(TypeMirror type)
type - original typeIllegalArgumentException - if some parameters were nullpublic String getMemberName(String token)
token - the original tokenpublic void setResourceGenerated(ClassDescription key)
key - the target resource keypublic boolean isResourceGenerated(ClassDescription key)
key - the target resource keytrue if it is already generated, otherwise falsepublic WarningAction getWarningAction()
public CompileEnvironment withWarningAction(WarningAction newValue)
newValue - the value to setpublic boolean isFlowpartExternalIo()
true if it is available, otherwise falsepublic CompileEnvironment withFlowpartExternalIo(boolean newValue)
newValue - true iff they are availablepublic boolean isForceGenerateImplementation()
true if it is available, otherwise falsepublic CompileEnvironment withForceGenerateImplementation(boolean newValue)
newValue - true iff it is availablepublic boolean isForceRegenerateResources()
true if it is available, otherwise falsepublic CompileEnvironment withForceRegenerateResources(boolean newValue)
newValue - true iff it is availablepublic boolean isStrictOperatorParameterOrder()
true if it is strict, otherwise falsepublic CompileEnvironment withStrictOperatorParameterOrder(boolean newValue)
newValue - true if it must be strict, otherwise falsepublic boolean isStrictOptionalOutputConnectivity()
true if it is strict, otherwise falsepublic CompileEnvironment withStrictOptionalOutputConnectivity(boolean newValue)
newValue - true if it must be strict, otherwise falsepublic boolean isForceNormalizeMemberName()
true is normalized, otherwise falsepublic CompileEnvironment withForceNormalizeMemberName(boolean newValue)
newValue - true is normalized, otherwise falsepublic boolean isEnumConstantParameter()
true if operators can accept enum constants, otherwise falsepublic CompileEnvironment withEnumConstantParameter(boolean newValue)
newValue - true to accept enum constants, otherwise falsepublic boolean isUnboundProjection()
true if operators can accept unbound projective models, otherwise falsepublic CompileEnvironment withUnboundProjection(boolean newValue)
newValue - true to accept unbound projective models, otherwise falseCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.