public class IlrBRLSemanticContext
extends java.lang.Object
implements ilog.rules.brl.brldf.IlrGrammarConstants
A business rule language semantic context is associated with a vocabulary and a business rule language definition.
IlrVocabulary,
IlrBRLDefinition| Modifier and Type | Method and Description |
|---|---|
void |
addSemanticError(java.lang.Object reporter,
java.lang.Object target,
java.lang.String id,
java.lang.Object[] args)
Adds a semantic error on a syntax node.
|
void |
addSemanticError(java.lang.Object reporter,
java.lang.Object target,
java.lang.String id,
java.lang.Object[] args,
java.lang.Object[] fixArgs)
Adds a semantic error on a syntax node, and sets the Quick Fix facility parameters.
|
IlrBRLMarker |
createMarker(java.lang.String id,
int offset,
int length,
java.lang.Object[] args)
Creates a marker that can report errors or warnings.
|
IlrBRLMarker |
createMarker(java.lang.String id,
int offset,
int length,
java.lang.Object[] args,
java.lang.Object[] fixArgs)
Creates a marker that can report errors or warnings, and sets the Quick Fix facility parameters.
|
IlrBRLVariable |
declareAssignableVariable(java.lang.String name,
IlrConcept type,
IlrCardinality cardinality,
int offset,
int availabilityOffset)
Declares an assignable variable in the current scope.
|
void |
disableCategoryFiltering()
Disables the filtering based on categories.
|
static java.util.Set |
getAnyCategoryFilter()
Setting the category filter to this value is equivalent to
disabling category filtering
|
IlrBRLDefinition |
getDefinition()
Returns the business rule language definition associated with the semantic context.
|
IlrBRLSemanticContextExtension |
getExtension()
Returns the semantic context language extension associated with the semantic context.
|
IlrBRLVariable |
getVariable(IlrSyntaxTree.Node node,
java.lang.String name)
Returns the variable named as the given argument
name, or null if no variable is found. |
IlrBRLVariableProvider |
getVariableProvider()
Returns the variable provider associated with the semantic context, if any.
|
IlrVocabulary |
getVocabulary()
Returns the vocabulary associated to the semantic context.
|
public IlrVocabulary getVocabulary()
public IlrBRLDefinition getDefinition()
public IlrBRLSemanticContextExtension getExtension()
semanticContextExtension.IlrBRLSemanticContextExtensionpublic IlrBRLMarker createMarker(java.lang.String id, int offset, int length, java.lang.Object[] args)
id - The ID of the marker to create.offset - The offset in the text referenced by the marker.length - The length in the text referenced by the marker.args - The arguments associated to the marker message.IlrBRLMarkerpublic IlrBRLMarker createMarker(java.lang.String id, int offset, int length, java.lang.Object[] args, java.lang.Object[] fixArgs)
id - The ID of the marker to create.offset - The offset in the text referenced by the marker.length - The length in the text referenced by the marker.args - The arguments associated to the marker message.fixArgs - The arguments associated to the marker fix processor.IlrBRLMarkerpublic IlrBRLVariableProvider getVariableProvider()
public static java.util.Set getAnyCategoryFilter()
public void disableCategoryFiltering()
any category filter.public void addSemanticError(java.lang.Object reporter,
java.lang.Object target,
java.lang.String id,
java.lang.Object[] args)
reporter - The node from which the error is reported.target - The node on which the error is reported.id - The ID of the error marker.args - The argument for the error message.IlrSyntaxTree.Node,
IlrBRLMarkerpublic void addSemanticError(java.lang.Object reporter,
java.lang.Object target,
java.lang.String id,
java.lang.Object[] args,
java.lang.Object[] fixArgs)
reporter - The node from which the error is reported.target - The node on which the error is reported.id - The ID of the error marker.args - The arguments for the error message.fixArgs - The arguments for the quick fix processor.IlrSyntaxTree.Node,
IlrBRLMarkerpublic IlrBRLVariable declareAssignableVariable(java.lang.String name, IlrConcept type, IlrCardinality cardinality, int offset, int availabilityOffset)
name - The name of the new variable.type - The concept of the new variable.cardinality - The cardinality of the new variable.offset - The offset of the variable declaration.availabilityOffset - The offset from where the variable can be referenced.public IlrBRLVariable getVariable(IlrSyntaxTree.Node node, java.lang.String name)
name, or null if no variable is found. The
variable is looked up from a specific node. The call to this method is only valid during the application of semantic
actions and semantic filters.node - The node from which the variable is looked up.name - The name of the variable to find.name, or null if no variable is found.IlrBRLVariable© Copyright IBM Corp. 1987, 2017