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

All Superinterfaces:
INRLAstNode
All Known Subinterfaces:
IArithmeticExpression, IBinaryOperatorStatement, IBinaryPredicate, IBooleanLiteral, ICastExpression, ICollectionIndex, IDecimalNumber, IExistsStatement, IExpression, IForallStatement, IFunctionalExpression, IGlobalExistsStatement, IIdentifier, IIfThenStatement, IIntegerNumber, IIsInPredicate, IIsNotInPredicate, IIsSubtypePredicate, ILiteralString, IModelReference, IMultipleExistsStatement, IMultipleNotExistsStatement, INotExistsStatement, IOperatorInvocation, IPredicate, ISelectionExpression, IValidationFragmentApplication, IVariableDeclaration

public interface IConstraint
extends INRLAstNode

A constraint occurs in a rule or fragment declaration, or recursively elsewhere.

Abstract syntax reference: Constraint ::= IfThenStatement


Field Summary
 
Fields inherited from interface net.sourceforge.nrl.parser.ast.INRLAstNode
NEWLINE
 
Method Summary
 NRLDataType getNRLDataType()
          Return a type constant from the NRLDataType class, indicating the data type of the constraint.
 void setNRLDataType(NRLDataType type)
          Assign an NRL type to this constraint.
 
Methods inherited from interface net.sourceforge.nrl.parser.ast.INRLAstNode
accept, dump, getColumn, getLine, getUserData, setUserData
 

Method Detail

getNRLDataType

NRLDataType getNRLDataType()
Return a type constant from the NRLDataType class, indicating the data type of the constraint.

This can only be called once a type inference algorithm has been applied to the constraint or the entire AST. Constraints either have type themselves, in the case of primitive constraints, or derived types inherited from expressions. Before type inference is called, the type is always NRLDataType.Type#Unknown.

Returns:
the type, never null

setNRLDataType

void setNRLDataType(NRLDataType type)
Assign an NRL type to this constraint.

Parameters:
type - the type


Copyright © 2006-2010 Christian Nentwich and others