org.drools.compiler.rule.builder.dialect.java
Class JavaDialect
java.lang.Object
org.drools.compiler.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,
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,
org.drools.core.base.TypeResolver typeResolver,
org.kie.api.io.Resource resource)
|
void |
addImport(ImportDescr importDescr)
|
void |
addRule(RuleBuildContext context)
This will add the rule for compiling later on. |
void |
addSrc(String resourceName,
byte[] content)
|
void |
addStaticImport(ImportDescr importDescr)
|
AnalysisResult |
analyzeBlock(PackageBuildContext context,
BaseDescr descr,
String text,
BoundIdentifiers availableIdentifiers)
|
AnalysisResult |
analyzeExpression(PackageBuildContext context,
BaseDescr descr,
Object content,
BoundIdentifiers availableIdentifiers)
|
AnalysisResult |
analyzeExpression(PackageBuildContext context,
BaseDescr descr,
Object content,
BoundIdentifiers availableIdentifiers,
Map<String,Class<?>> localTypes)
|
void |
clearResults()
|
void |
compileAll()
This actually triggers the compiling of all the resources. |
AccumulateBuilder |
getAccumulateBuilder()
|
RuleConditionBuilder |
getBuilder(Class clazz)
|
Map<Class<?>,EngineElementBuilder> |
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<org.kie.internal.builder.KnowledgeBuilderResult> |
getResults()
|
ReturnValueBuilder |
getReturnValueBuilder()
|
RuleClassBuilder |
getRuleClassBuilder()
|
SalienceBuilder |
getSalienceBuilder()
|
org.drools.core.base.TypeResolver |
getTypeResolver()
Returns the current type resolver instance |
void |
init(ProcessDescr processDescr)
|
void |
init(RuleDescr ruleDescr)
|
static void |
initBuilder()
|
void |
postCompileAddFunction(FunctionDescr functionDescr,
org.drools.core.base.TypeResolver typeResolver)
|
void |
preCompileAddFunction(FunctionDescr functionDescr,
org.drools.core.base.TypeResolver typeResolver)
|
static void |
reinitBuilder()
|
| 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
PATTERN_BUILDER
protected static final PatternBuilder PATTERN_BUILDER
QUERY_BUILDER
protected static final QueryBuilder QUERY_BUILDER
SALIENCE_BUILDER
protected static final SalienceBuilder SALIENCE_BUILDER
ENABLED_BUILDER
protected static final EnabledBuilder ENABLED_BUILDER
ACCUMULATE_BUILDER
protected static final JavaAccumulateBuilder ACCUMULATE_BUILDER
EVAL_BUILDER
protected static final RuleConditionBuilder EVAL_BUILDER
PREDICATE_BUILDER
protected static final PredicateBuilder PREDICATE_BUILDER
RETURN_VALUE_BUILDER
protected static final ReturnValueBuilder RETURN_VALUE_BUILDER
CONSEQUENCE_BUILDER
protected static final ConsequenceBuilder CONSEQUENCE_BUILDER
RULE_CLASS_BUILDER
protected static final JavaRuleClassBuilder RULE_CLASS_BUILDER
FROM_BUILDER
protected static final MVELFromBuilder FROM_BUILDER
FUNCTION_BUILDER
protected static final JavaFunctionBuilder FUNCTION_BUILDER
COLLECT_BUIDER
protected static final CollectBuilder COLLECT_BUIDER
FORALL_BUILDER
protected static final ForallBuilder FORALL_BUILDER
ENTRY_POINT_BUILDER
protected static final EntryPointBuilder ENTRY_POINT_BUILDER
WINDOW_REFERENCE_BUILDER
protected static final WindowReferenceBuilder WINDOW_REFERENCE_BUILDER
GE_BUILDER
protected static final GroupElementBuilder GE_BUILDER
NAMED_CONSEQUENCE_BUILDER
protected static final NamedConsequenceBuilder NAMED_CONSEQUENCE_BUILDER
CONDITIONAL_BRANCH_BUILDER
protected static final ConditionalBranchBuilder CONDITIONAL_BRANCH_BUILDER
JavaDialect
public JavaDialect(ClassLoader rootClassLoader,
KnowledgeBuilderConfigurationImpl pkgConf,
PackageRegistry pkgRegistry,
org.drools.core.definitions.InternalKnowledgePackage pkg)
initBuilder
public static void initBuilder()
reinitBuilder
public static void reinitBuilder()
getBuilders
public Map<Class<?>,EngineElementBuilder> 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
analyzeExpression
public AnalysisResult analyzeExpression(PackageBuildContext context,
BaseDescr descr,
Object content,
BoundIdentifiers availableIdentifiers,
Map<String,Class<?>> localTypes)
analyzeBlock
public AnalysisResult analyzeBlock(PackageBuildContext context,
BaseDescr descr,
String text,
BoundIdentifiers availableIdentifiers)
- Specified by:
analyzeBlock in interface Dialect
getTypeResolver
public org.drools.core.base.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,
org.drools.core.base.TypeResolver typeResolver,
org.kie.api.io.Resource resource)
- Specified by:
addFunction in interface Dialect
preCompileAddFunction
public void preCompileAddFunction(FunctionDescr functionDescr,
org.drools.core.base.TypeResolver typeResolver)
- Specified by:
preCompileAddFunction in interface Dialect
postCompileAddFunction
public void postCompileAddFunction(FunctionDescr functionDescr,
org.drools.core.base.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,
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(ImportDescr importDescr)
- Specified by:
addImport in interface Dialect
addStaticImport
public void addStaticImport(ImportDescr importDescr)
- Specified by:
addStaticImport in interface Dialect
getResults
public List<org.kie.internal.builder.KnowledgeBuilderResult> getResults()
- Specified by:
getResults in interface Dialect
clearResults
public void clearResults()
- Specified by:
clearResults 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-2015 JBoss by Red Hat. All Rights Reserved.