org.drools.rule.builder.dialect.java
Class JavaDialect
java.lang.Object
org.drools.rule.builder.dialect.java.JavaDialect
- All Implemented Interfaces:
- Dialect
public class JavaDialect
- extends Object
- implements Dialect
|
Method Summary |
void |
addClassCompileTask(String className,
BaseDescr descr,
String text,
MemoryResourceReader src,
PackageBuilder.ErrorHandler handler)
This adds a compile "task" for when the compiler of
semantics (JCI) is called later on with compileAll()\
which actually does the compiling. |
void |
addClassName(String className)
|
void |
addFunction(FunctionDescr functionDescr,
TypeResolver typeResolver,
org.drools.io.Resource resource)
|
void |
addImport(String importEntry)
|
void |
addRule(RuleBuildContext context)
This will add the rule for compiling later on. |
void |
addSrc(String resourceName,
byte[] content)
|
void |
addStaticImport(String staticImportEntry)
|
AnalysisResult |
analyzeBlock(PackageBuildContext context,
BaseDescr descr,
String text,
BoundIdentifiers availableIdentifiers)
|
AnalysisResult |
analyzeExpression(PackageBuildContext context,
BaseDescr descr,
Object content,
BoundIdentifiers availableIdentifiers)
|
void |
compileAll()
This actually triggers the compiling of all the resources. |
AccumulateBuilder |
getAccumulateBuilder()
|
RuleConditionBuilder |
getBuilder(Class clazz)
|
Map |
getBuilders()
|
ConsequenceBuilder |
getConsequenceBuilder()
|
EnabledBuilder |
getEnabledBuilder()
|
EntryPointBuilder |
getEntryPointBuilder()
|
RuleConditionBuilder |
getEvalBuilder()
|
String |
getExpressionDialectName()
|
FromBuilder |
getFromBuilder()
|
FunctionBuilder |
getFunctionBuilder()
|
String |
getId()
|
PackageRegistry |
getPackageRegistry()
|
PatternBuilder |
getPatternBuilder()
|
PredicateBuilder |
getPredicateBuilder()
|
QueryBuilder |
getQueryBuilder()
|
List |
getResults()
|
ReturnValueBuilder |
getReturnValueBuilder()
|
RuleClassBuilder |
getRuleClassBuilder()
|
SalienceBuilder |
getSalienceBuilder()
|
TypeResolver |
getTypeResolver()
Returns the current type resolver instance |
void |
init(ProcessDescr processDescr)
|
void |
init(RuleDescr ruleDescr)
|
static void |
initBuilder()
|
void |
postCompileAddFunction(FunctionDescr functionDescr,
TypeResolver typeResolver)
|
void |
preCompileAddFunction(FunctionDescr functionDescr,
TypeResolver typeResolver)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ID
public static final String ID
- See Also:
- Constant Field Values
JavaDialect
public JavaDialect(PackageBuilder builder,
PackageRegistry pkgRegistry,
Package pkg)
initBuilder
public static void initBuilder()
getBuilders
public Map getBuilders()
- Specified by:
getBuilders in interface Dialect
init
public void init(RuleDescr ruleDescr)
- Specified by:
init in interface Dialect
init
public void init(ProcessDescr processDescr)
- Specified by:
init in interface Dialect
getExpressionDialectName
public String getExpressionDialectName()
- Specified by:
getExpressionDialectName in interface Dialect
analyzeExpression
public AnalysisResult analyzeExpression(PackageBuildContext context,
BaseDescr descr,
Object content,
BoundIdentifiers availableIdentifiers)
- Specified by:
analyzeExpression in interface Dialect
analyzeBlock
public AnalysisResult analyzeBlock(PackageBuildContext context,
BaseDescr descr,
String text,
BoundIdentifiers availableIdentifiers)
- Specified by:
analyzeBlock in interface Dialect
getTypeResolver
public TypeResolver getTypeResolver()
- Returns the current type resolver instance
- Specified by:
getTypeResolver in interface Dialect
- Returns:
getBuilder
public RuleConditionBuilder getBuilder(Class clazz)
- Specified by:
getBuilder in interface Dialect
getPatternBuilder
public PatternBuilder getPatternBuilder()
- Specified by:
getPatternBuilder in interface Dialect
getQueryBuilder
public QueryBuilder getQueryBuilder()
- Specified by:
getQueryBuilder in interface Dialect
getSalienceBuilder
public SalienceBuilder getSalienceBuilder()
- Specified by:
getSalienceBuilder in interface Dialect
getEnabledBuilder
public EnabledBuilder getEnabledBuilder()
- Specified by:
getEnabledBuilder in interface Dialect
getAccumulateBuilder
public AccumulateBuilder getAccumulateBuilder()
- Specified by:
getAccumulateBuilder in interface Dialect
getEvalBuilder
public RuleConditionBuilder getEvalBuilder()
- Specified by:
getEvalBuilder in interface Dialect
getPredicateBuilder
public PredicateBuilder getPredicateBuilder()
- Specified by:
getPredicateBuilder in interface Dialect
getReturnValueBuilder
public ReturnValueBuilder getReturnValueBuilder()
- Specified by:
getReturnValueBuilder in interface Dialect
getConsequenceBuilder
public ConsequenceBuilder getConsequenceBuilder()
- Specified by:
getConsequenceBuilder in interface Dialect
getRuleClassBuilder
public RuleClassBuilder getRuleClassBuilder()
- Specified by:
getRuleClassBuilder in interface Dialect
getFunctionBuilder
public FunctionBuilder getFunctionBuilder()
getFromBuilder
public FromBuilder getFromBuilder()
- Specified by:
getFromBuilder in interface Dialect
getEntryPointBuilder
public EntryPointBuilder getEntryPointBuilder()
- Specified by:
getEntryPointBuilder in interface Dialect
compileAll
public void compileAll()
- This actually triggers the compiling of all the resources.
Errors are mapped back to the element that originally generated the semantic
code.
- Specified by:
compileAll in interface Dialect
addRule
public void addRule(RuleBuildContext context)
- This will add the rule for compiling later on.
It will not actually call the compiler
- Specified by:
addRule in interface Dialect
addFunction
public void addFunction(FunctionDescr functionDescr,
TypeResolver typeResolver,
org.drools.io.Resource resource)
- Specified by:
addFunction in interface Dialect
preCompileAddFunction
public void preCompileAddFunction(FunctionDescr functionDescr,
TypeResolver typeResolver)
- Specified by:
preCompileAddFunction in interface Dialect
postCompileAddFunction
public void postCompileAddFunction(FunctionDescr functionDescr,
TypeResolver typeResolver)
- Specified by:
postCompileAddFunction in interface Dialect
addSrc
public void addSrc(String resourceName,
byte[] content)
addClassCompileTask
public void addClassCompileTask(String className,
BaseDescr descr,
String text,
MemoryResourceReader src,
PackageBuilder.ErrorHandler handler)
- This adds a compile "task" for when the compiler of
semantics (JCI) is called later on with compileAll()\
which actually does the compiling.
The ErrorHandler is required to map the errors back to the
element that caused it.
addClassName
public void addClassName(String className)
addImport
public void addImport(String importEntry)
- Specified by:
addImport in interface Dialect
addStaticImport
public void addStaticImport(String staticImportEntry)
- Specified by:
addStaticImport in interface Dialect
getResults
public List getResults()
- Specified by:
getResults in interface Dialect
getId
public String getId()
- Specified by:
getId in interface Dialect
getPackageRegistry
public PackageRegistry getPackageRegistry()
- Specified by:
getPackageRegistry in interface Dialect
Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.