edu.mit.sketch.ddlcompiler
Class AttachedConstraintNode

java.lang.Object
  extended by edu.mit.sketch.ddlcompiler.ConstraintNode
      extended by 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
 java.lang.String arg1
           
 java.lang.String arg2
           
 
Constructor Summary
AttachedConstraintNode(java.lang.String arg1, java.lang.String arg2)
           
 
Method Summary
 java.lang.String[] getConstraintIdentifiers()
          Returns a string array consisting of the constraint indentifiers
 java.lang.String toInstanceMethodCall()
          The method call string which uses arg*_instance instead of arg*
 java.lang.String toMethodCall()
          The method call string.
 java.lang.String toString()
          The string representation.
 boolean usesMember(java.lang.String input_id)
          Return true if a member variable of this constraint has the same name as the input string.
 
Methods inherited from class edu.mit.sketch.ddlcompiler.ConstraintNode
getConstraintType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

arg1

public java.lang.String arg1

arg2

public java.lang.String arg2
Constructor Detail

AttachedConstraintNode

public AttachedConstraintNode(java.lang.String arg1,
                              java.lang.String arg2)
Method Detail

toMethodCall

public java.lang.String toMethodCall()
The method call string.

Specified by:
toMethodCall in class ConstraintNode

toInstanceMethodCall

public java.lang.String toInstanceMethodCall()
The method call string which uses arg*_instance instead of arg*

Specified by:
toInstanceMethodCall in class ConstraintNode

toString

public java.lang.String toString()
The string representation.

Specified by:
toString in interface ASTNode
Overrides:
toString in class ConstraintNode

usesMember

public boolean usesMember(java.lang.String input_id)
Return true if a member variable of this constraint has the same name as the input string.

Specified by:
usesMember in class ConstraintNode

getConstraintIdentifiers

public java.lang.String[] getConstraintIdentifiers()
Returns a string array consisting of the constraint indentifiers

Specified by:
getConstraintIdentifiers in class ConstraintNode