Package org.drools.compiler.rule.builder
Class PackageBuildContext
java.lang.Object
org.drools.compiler.rule.builder.PackageBuildContext
- Direct Known Subclasses:
RuleBuildContext
A context for the current build
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDescrLookups(String className, BaseDescr baseDescr) voidaddError(DroolsError error) voidaddInvoker(String invokerClassName, String invoker) voidaddInvokerLookup(String className, Object invokerLookup) voidvoidaddWarning(DroolsWarning warning) intReturns current counter value for generated method namesgetDescrLookup(String className) Returns the Map<String invokerClassName, BaseDescr descr> of descriptor lookupsgetDialect(String dialectName) Returns the list of errors found while building the current contextgetInvokerLookup(String className) Returns the Map<String invokerClassName, String invokerCode> of generated invokersReturns the list of generated methodsintgetPkg()Returns the current package being builtvoidinitContext(TypeDeclarationContext kBuilder, InternalKnowledgePackage pkg, BaseDescr parentDescr, DialectCompiletimeRegistry dialectRegistry, Dialect defaultDialect, Dialectable component) Default constructorbooleanresolveVarType(String identifier) voidsetDialect(Dialect dialect) Allows the change of the current dialect in the contextvoidsetParentDescr(BaseDescr descr) voidsetTypesafe(boolean stricttype)
-
Constructor Details
-
PackageBuildContext
public PackageBuildContext()
-
-
Method Details
-
initContext
public void initContext(TypeDeclarationContext kBuilder, InternalKnowledgePackage pkg, BaseDescr parentDescr, DialectCompiletimeRegistry dialectRegistry, Dialect defaultDialect, Dialectable component) Default constructor -
getParentDescr
-
setParentDescr
-
getDialect
-
setDialect
Allows the change of the current dialect in the context -
getDialect
-
getDialectRegistry
-
getErrors
Returns the list of errors found while building the current context- Returns:
-
addError
-
getWarnings
-
addWarning
-
getPkg
Returns the current package being built- Returns:
-
getDescrLookup
Returns the Map<String invokerClassName, BaseDescr descr> of descriptor lookups- Returns:
-
addDescrLookups
-
getInvokerLookup
-
addInvokerLookup
-
getInvokers
Returns the Map<String invokerClassName, String invokerCode> of generated invokers- Returns:
-
addInvoker
-
getMethods
Returns the list of generated methods- Returns:
-
addMethod
-
getCurrentId
public int getCurrentId()Returns current counter value for generated method names- Returns:
-
getNextId
public int getNextId() -
getConfiguration
-
getKnowledgeBuilder
-
isTypesafe
public boolean isTypesafe() -
setTypesafe
public void setTypesafe(boolean stricttype) -
resolveVarType
-