net.sourceforge.nrl.parser.ast.constraints
Interface IVariableDeclaration

All Superinterfaces:
IConstraint, INRLAstNode
All Known Implementing Classes:
VariableDeclarationImpl

public interface IVariableDeclaration
extends IConstraint

A variable declaration statement.

Abstract syntax reference: DeclareStatement ::= declare Variable expression

Author:
Christian Nentwich

Field Summary
 
Fields inherited from interface net.sourceforge.nrl.parser.ast.INRLAstNode
NEWLINE
 
Method Summary
 IExpression getExpression()
          Get the expression that initialises the variable.
 String getVariableName()
          Return the variable name
 IVariable getVariableReference()
          Create a resolved variable reference.
 
Methods inherited from interface net.sourceforge.nrl.parser.ast.constraints.IConstraint
getNRLDataType, setNRLDataType
 
Methods inherited from interface net.sourceforge.nrl.parser.ast.INRLAstNode
accept, dump, getColumn, getLine, getUserData, setUserData
 

Method Detail

getVariableName

String getVariableName()
Return the variable name

Returns:
the variable name

getExpression

IExpression getExpression()
Get the expression that initialises the variable.

Returns:
the expression

getVariableReference

IVariable getVariableReference()
Create a resolved variable reference. This initialises a variable as declared by this expression. This method can only be called when the AST has been resolved against a model. It can be called any number of times.

Returns:
the variable


Copyright © 2006-2013. All Rights Reserved.