edu.mit.sketch.ddlcompiler
Class AttachedConstraintNode

java.lang.Object
  |
  +--edu.mit.sketch.ddlcompiler.ConstraintNode
        |
        +--edu.mit.sketch.ddlcompiler.AttachedConstraintNode
All Implemented Interfaces:
ASTNode

public class AttachedConstraintNode
extends ConstraintNode

Parsing can be thought of as generating and AST. This class represents a "attached constraint node" in such an AST. Look at the language specification for the semantics of the "attached" constraint.


Field Summary
 String arg1
           
 String arg2
           
 
Constructor Summary
AttachedConstraintNode(String arg1, String arg2)
           
 
Method Summary
 String[] getConstraintIdentifiers()
          Returns a string array consisting of the constraint indentifiers
 String toInstanceMethodCall()
          The method call string which uses arg*_instance instead of arg*
 String toMethodCall()
          The method call string.
 String toString()
          The string representation.
 boolean usesMember(String input_id)
          Return true if a member variable of this constraint has the same name as the input string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

arg1

public String arg1

arg2

public String arg2
Constructor Detail

AttachedConstraintNode

public AttachedConstraintNode(String arg1,
                              String arg2)
Method Detail

toMethodCall

public String toMethodCall()
The method call string.
Overrides:
toMethodCall in class ConstraintNode

toInstanceMethodCall

public String toInstanceMethodCall()
The method call string which uses arg*_instance instead of arg*
Overrides:
toInstanceMethodCall in class ConstraintNode

toString

public String toString()
The string representation.
Overrides:
toString in class ConstraintNode

usesMember

public boolean usesMember(String input_id)
Return true if a member variable of this constraint has the same name as the input string.
Overrides:
usesMember in class ConstraintNode

getConstraintIdentifiers

public String[] getConstraintIdentifiers()
Returns a string array consisting of the constraint indentifiers
Overrides:
getConstraintIdentifiers in class ConstraintNode