|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deduced.dynamic.AbstractDynamicExecutionCompiler org.deduced.dynamic.DeductionRuleExecutionCompiler
public class DeductionRuleExecutionCompiler
DeductionRuleExecutionCompiler
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.deduced.dynamic.AbstractDynamicExecutionCompiler |
---|
AbstractDynamicExecutionCompiler.DynamicFileNameGenerator, AbstractDynamicExecutionCompiler.FileNameGenerator, AbstractDynamicExecutionCompiler.LocalClassLoader |
Field Summary | |
---|---|
private static DeductionRuleExecutionCompiler |
INSTANCE
unique instance of the deduction rule execution compiler |
Fields inherited from class org.deduced.dynamic.AbstractDynamicExecutionCompiler |
---|
CLASS_FILE_EXTENSION, DEDUCED_DYNAMIC_CLASS_NAME, DYNAMIC_CODE_PACKAGE_NAME, FILE_NAME_GENERATOR, JAVA_FILE_EXTENSION |
Constructor Summary | |
---|---|
protected |
DeductionRuleExecutionCompiler()
DeductionRuleExecutionCompiler constructor |
Method Summary | |
---|---|
void |
buildClassContent(PropertyCollection compiledModel,
java.lang.String className,
java.lang.String packageName,
java.lang.StringBuilder builder)
(non-JSDoc) |
static DynamicExecutionCompiler |
getInstance()
get the deduction rule execution compiler Instance |
static java.lang.String |
getRuleMethodName(PropertyCollection<?,?> rule)
get Rule Method Name |
static boolean |
isReferenceMultiple(java.util.List<?> instanceList)
test if a reference can result in multiple values |
static void |
printReferenceClassType(java.lang.StringBuilder builder,
PropertyCollection<?,?> instanceReference)
print Reference Class Type |
static void |
printRuleClassHeader(java.lang.String className,
java.lang.String packageName,
java.lang.StringBuilder builder)
print Rule Class Header |
static void |
printRuleGenericMethod(PropertyCollection<?,?> rule,
java.lang.StringBuilder builder)
print Rule Generic Method |
static void |
printRuleGenericMethodDeclaration(java.lang.StringBuilder builder)
print Rule Generic Method Declaration |
static void |
printRuleSpecificMethod(PropertyCollection<?,?> rule,
java.lang.StringBuilder builder)
print Rule Specific Method |
void |
validateCompilationModelForCompilation(PropertyCollection compiledModel,
CompileResult result)
(non-JSDoc) |
private void |
validateOutputListSize(PropertyCollection deductionRule,
int outputListSize)
validate Output List Size. |
private void |
validateOutputType(PropertyCollection deductionRule,
PropertyCollection<?,?> output)
validate Output Type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final DeductionRuleExecutionCompiler INSTANCE
Constructor Detail |
---|
protected DeductionRuleExecutionCompiler()
Method Detail |
---|
public static DynamicExecutionCompiler getInstance()
public void buildClassContent(PropertyCollection compiledModel, java.lang.String className, java.lang.String packageName, java.lang.StringBuilder builder)
buildClassContent
in class AbstractDynamicExecutionCompiler
compiledModel
- the compiled modelclassName
- the class name to usepackageName
- the package name to usebuilder
- the string builder containing the class contentAbstractDynamicExecutionCompiler.buildClassContent(org.deduced.PropertyCollection,
java.lang.String, java.lang.String, java.lang.StringBuilder)
public static void printRuleGenericMethod(PropertyCollection<?,?> rule, java.lang.StringBuilder builder)
rule
- the rule to printbuilder
- the string builder in which to print the contentpublic static void printRuleGenericMethodDeclaration(java.lang.StringBuilder builder)
builder
- the rule string builderpublic static void printRuleClassHeader(java.lang.String className, java.lang.String packageName, java.lang.StringBuilder builder)
className
- the class namepackageName
- the package namebuilder
- the string builder in which to print the contentpublic static void printRuleSpecificMethod(PropertyCollection<?,?> rule, java.lang.StringBuilder builder)
rule
- the rule to printbuilder
- the string builder in which to write the class contentpublic static void printReferenceClassType(java.lang.StringBuilder builder, PropertyCollection<?,?> instanceReference)
builder
- string builder in which to print the contentinstanceReference
- the instance reference to printpublic static boolean isReferenceMultiple(java.util.List<?> instanceList)
instanceList
- the instance list
public static java.lang.String getRuleMethodName(PropertyCollection<?,?> rule)
rule
- the rule from which to extract the method name
public void validateCompilationModelForCompilation(PropertyCollection compiledModel, CompileResult result)
validateCompilationModelForCompilation
in class AbstractDynamicExecutionCompiler
compiledModel
- the compiled modelresult
- the compilation result to fillAbstractDynamicExecutionCompiler.validateCompilationModelForCompilation(org.deduced.PropertyCollection,
org.deduced.controller.implementation.CompileResult)
private void validateOutputListSize(PropertyCollection deductionRule, int outputListSize)
deductionRule
- the rule we are creatingoutputListSize
- the output list sizeprivate void validateOutputType(PropertyCollection deductionRule, PropertyCollection<?,?> output)
deductionRule
- the rule we are creatingoutput
- the current output
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |