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 protected
DeclarationScopeResolver()
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 boolean
available(RuleImpl rule, String name)
Pattern
findPatternById(int id)
Declaration
getDeclaration(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 stackboolean
hasDataSource(String name)
boolean
isDuplicated(RuleImpl rule, String name, String type)
String
normalizeValueForUnit(String value)
RuleConditionElement
peekBuildStack()
RuleConditionElement
popBuildStack()
void
pushOnBuildStack(RuleConditionElement element)
Class<?>
resolveVarType(String identifier)
void
setRule(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)
-
-