net.sourceforge.nrl.parser.ast
Interface IRuleDeclaration

All Superinterfaces:
IDeclaration, INRLAstNode, ISingleContextDeclaration
All Known Subinterfaces:
IActionRuleDeclaration, IConstraintRuleDeclaration

public interface IRuleDeclaration
extends ISingleContextDeclaration

A generic rule declaration. Extends a declaration to add a possible containing rule set.


Field Summary
 
Fields inherited from interface net.sourceforge.nrl.parser.ast.INRLAstNode
NEWLINE
 
Method Summary
 IRuleSetDeclaration getRuleSet()
          Return the rule set that the rule is contained in, if any.
 void setRuleSet(IRuleSetDeclaration ruleSet)
          Set the rule set that this rule is contained in.
 
Methods inherited from interface net.sourceforge.nrl.parser.ast.ISingleContextDeclaration
getContext
 
Methods inherited from interface net.sourceforge.nrl.parser.ast.IDeclaration
getId
 
Methods inherited from interface net.sourceforge.nrl.parser.ast.INRLAstNode
accept, dump, getColumn, getLine, getUserData, setUserData
 

Method Detail

getRuleSet

IRuleSetDeclaration getRuleSet()
Return the rule set that the rule is contained in, if any. If the rule is declared standalone, this returns null.

This can only be called once the AST has been fully resolved.

Returns:
the rule set

setRuleSet

void setRuleSet(IRuleSetDeclaration ruleSet)
Set the rule set that this rule is contained in.

Parameters:
ruleSet - the rule set


Copyright © 2006-2010 Christian Nentwich and others