Package org.drools.core.spi
Class DeclarationScopeResolver
- java.lang.Object
-
- org.drools.core.spi.DeclarationScopeResolver
-
public class DeclarationScopeResolver extends Object
A class capable of resolving a declaration in the current build context
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDeclarationScopeResolver()DeclarationScopeResolver(Map<String,Class<?>> globalMap, Stack<RuleConditionElement> buildStack)DeclarationScopeResolver(Map<String,Class<?>> globalMap, InternalKnowledgePackage pkg)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanavailable(RuleImpl rule, String name)PatternfindPatternById(int id)DeclarationgetDeclaration(String identifier)static Map<String,Class<?>>getDeclarationClasses(Map<String,Declaration> declarations)Map<String,Class<?>>getDeclarationClasses(RuleImpl rule)Map<String,Declaration>getDeclarations(RuleImpl rule)Map<String,Declaration>getDeclarations(RuleImpl rule, String consequenceName)Return all declarations scoped to the current RuleConditionElement in the build stackbooleanhasDataSource(String name)booleanisDuplicated(RuleImpl rule, String name, String type)StringnormalizeValueForUnit(String value)RuleConditionElementpeekBuildStack()RuleConditionElementpopBuildStack()voidpushOnBuildStack(RuleConditionElement element)Class<?>resolveVarType(String identifier)voidsetRule(RuleImpl rule)
-
-
-
Constructor Detail
-
DeclarationScopeResolver
protected DeclarationScopeResolver()
-
DeclarationScopeResolver
public DeclarationScopeResolver(Map<String,Class<?>> globalMap, Stack<RuleConditionElement> buildStack)
-
DeclarationScopeResolver
public DeclarationScopeResolver(Map<String,Class<?>> globalMap, InternalKnowledgePackage pkg)
-
-
Method Detail
-
setRule
public void setRule(RuleImpl rule)
-
peekBuildStack
public RuleConditionElement peekBuildStack()
-
popBuildStack
public RuleConditionElement popBuildStack()
-
pushOnBuildStack
public void pushOnBuildStack(RuleConditionElement element)
-
getDeclaration
public Declaration getDeclaration(String identifier)
-
hasDataSource
public boolean hasDataSource(String name)
-
getDeclarations
public Map<String,Declaration> getDeclarations(RuleImpl rule)
-
getDeclarations
public Map<String,Declaration> getDeclarations(RuleImpl rule, String consequenceName)
Return all declarations scoped to the current RuleConditionElement in the build stack
-
getDeclarationClasses
public static Map<String,Class<?>> getDeclarationClasses(Map<String,Declaration> declarations)
-
findPatternById
public Pattern findPatternById(int id)
-
-