net.sourceforge.nrl.parser.ast.action
Interface IActionRuleDeclaration

All Superinterfaces:
IDeclaration, INRLAstNode, IRuleDeclaration, ISingleContextDeclaration

public interface IActionRuleDeclaration
extends IRuleDeclaration

Declaration of an action type rule. Has an id, a context and an action.


Field Summary
 
Fields inherited from interface net.sourceforge.nrl.parser.ast.INRLAstNode
NEWLINE
 
Method Summary
 IAction getAction()
          Get the rule action.
 boolean hasContext()
          Indicate whether this action rule has a context, or only uses actions that do not require a context.
 
Methods inherited from interface net.sourceforge.nrl.parser.ast.IRuleDeclaration
getRuleSet, setRuleSet
 
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

getAction

IAction getAction()
Get the rule action. Never returns null. The action is either a ICompoundAction or a IConditionalAction - see the grammar for more details.

Returns:
the action

hasContext

boolean hasContext()
Indicate whether this action rule has a context, or only uses actions that do not require a context.

This will be true for most rules. For some, for example those that only use "create" or "select", a context is unnecessary and this will return false.

Calling ISingleContextDeclaration.getContext() on such a rule will return a reserved model object with no attriutes.

Returns:
true if there is a context else false


Copyright © 2006-2010 Christian Nentwich and others