edu.mit.sketch.ddlcompiler
Class ConstraintNode
java.lang.Object
|
+--edu.mit.sketch.ddlcompiler.ConstraintNode
- All Implemented Interfaces:
- ASTNode
- Direct Known Subclasses:
- AboveConstraintNode, AngleConstraintNode, AttachedConstraintNode, BelowConstraintNode, LeftConstraintNode, LowerLeftConstraintNode, LowerRightConstraintNode, MeetConstraintNode, ParallelConstraintNode, PerpendicularConstraintNode, RightConstraintNode, TouchConstraintNode, UpperLeftConstraintNode, UpperRightConstraintNode
- public abstract class ConstraintNode
- extends Object
- implements ASTNode
Parsing can be thought of as generating and AST. This class
represents a constraint node in such an AST. All legal
constraint nodes should extend implement this interface.
ConstraintNode
public ConstraintNode()
toMethodCall
public abstract String toMethodCall()
- The method call string.
toInstanceMethodCall
public abstract String toInstanceMethodCall()
- The method call string which uses arg*_instance
instead of arg*
usesMember
public abstract boolean usesMember(String input_id)
- Return true if a member variable of this constraint has the
same name as the input string.
getConstraintIdentifiers
public abstract String[] getConstraintIdentifiers()
- Returns a string array consisting of the constraint indentifiers
toString
public String toString()
- The string representation.
- Specified by:
toString in interface ASTNode- Overrides:
toString in class Object