Package org.drools.compiler.rule.builder
Class PackageBuildContext
- java.lang.Object
-
- org.drools.compiler.rule.builder.PackageBuildContext
-
- Direct Known Subclasses:
RuleBuildContext
public class PackageBuildContext extends Object
A context for the current build
-
-
Constructor Summary
Constructors Constructor Description PackageBuildContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDescrLookups(String className, BaseDescr baseDescr)
void
addError(DroolsError error)
void
addInvoker(String invokerClassName, String invoker)
void
addInvokerLookup(String className, Object invokerLookup)
void
addMethod(String method)
void
addWarning(DroolsWarning warning)
KnowledgeBuilderConfigurationImpl
getConfiguration()
int
getCurrentId()
Returns current counter value for generated method namesBaseDescr
getDescrLookup(String className)
Returns the Mapof descriptor lookups Dialect
getDialect()
Dialect
getDialect(String dialectName)
DialectCompiletimeRegistry
getDialectRegistry()
List<DroolsError>
getErrors()
Returns the list of errors found while building the current contextObject
getInvokerLookup(String className)
Map<String,String>
getInvokers()
Returns the Mapof generated invokers DroolsAssemblerContext
getKnowledgeBuilder()
List<String>
getMethods()
Returns the list of generated methodsint
getNextId()
BaseDescr
getParentDescr()
org.drools.core.definitions.InternalKnowledgePackage
getPkg()
Returns the current package being builtList<DroolsWarning>
getWarnings()
void
init(DroolsAssemblerContext kBuilder, org.drools.core.definitions.InternalKnowledgePackage pkg, BaseDescr parentDescr, DialectCompiletimeRegistry dialectRegistry, Dialect defaultDialect, org.drools.core.rule.Dialectable component)
Default constructorboolean
isTypesafe()
Class<?>
resolveVarType(String identifier)
void
setDialect(Dialect dialect)
Allows the change of the current dialect in the contextvoid
setParentDescr(BaseDescr descr)
void
setTypesafe(boolean stricttype)
-
-
-
Method Detail
-
init
public void init(DroolsAssemblerContext kBuilder, org.drools.core.definitions.InternalKnowledgePackage pkg, BaseDescr parentDescr, DialectCompiletimeRegistry dialectRegistry, Dialect defaultDialect, org.drools.core.rule.Dialectable component)
Default constructor
-
getParentDescr
public BaseDescr getParentDescr()
-
setParentDescr
public void setParentDescr(BaseDescr descr)
-
getDialect
public Dialect getDialect()
-
setDialect
public void setDialect(Dialect dialect)
Allows the change of the current dialect in the context
-
getDialectRegistry
public DialectCompiletimeRegistry getDialectRegistry()
-
getErrors
public List<DroolsError> getErrors()
Returns the list of errors found while building the current context- Returns:
-
addError
public void addError(DroolsError error)
-
getWarnings
public List<DroolsWarning> getWarnings()
-
addWarning
public void addWarning(DroolsWarning warning)
-
getPkg
public org.drools.core.definitions.InternalKnowledgePackage getPkg()
Returns the current package being built- Returns:
-
getDescrLookup
public BaseDescr getDescrLookup(String className)
Returns the Mapof descriptor lookups - Returns:
-
addMethod
public void addMethod(String method)
-
getCurrentId
public int getCurrentId()
Returns current counter value for generated method names- Returns:
-
getNextId
public int getNextId()
-
getConfiguration
public KnowledgeBuilderConfigurationImpl getConfiguration()
-
getKnowledgeBuilder
public DroolsAssemblerContext getKnowledgeBuilder()
-
isTypesafe
public boolean isTypesafe()
-
setTypesafe
public void setTypesafe(boolean stricttype)
-
-