| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.llnl.babel.symbols.AssertionExpression
public abstract class AssertionExpression
| Field Summary | |
|---|---|
| protected  Context | d_context | 
| static java.lang.String | ERROR_SEMANTIC_VALIDATION | 
| Constructor Summary | |
|---|---|
| AssertionExpression(boolean valid,
                    Context context)Used to initialize the basic expression attributes. | |
| Method Summary | |
|---|---|
| abstract  java.lang.Object | accept(ExprVisitor ev,
       java.lang.Object data)Implement the "visitor pattern". | 
| abstract  java.lang.String | cExpression(java.lang.String epvVar,
            int[] startInd)Return the C version of the expression. | 
| abstract  java.util.ArrayList | getArrayIterMacros(java.lang.String epvVar,
                   int[] startInd)Return the list of array iteration macro messages, if any. | 
| protected  java.lang.String | getExceptionPrefix(Extendable ext)Return the prefix for exception messages based on the specified extendable. | 
| protected  java.lang.String | getExceptionPrefix(Extendable ext,
                   Method m)Return the prefix for exception messages based on the specified extendable and method. | 
| abstract  int | getNumArrayIterMacrosByType(char type)Returns the number of macros supported by this assertion of the specified type. | 
|  Type | getReturnType()Return the return type. | 
|  java.lang.String | getReturnTypeName()Return the name of the return type or, if empty, null. | 
|  int | getReturnTypeValue()Return the value of the return type or -1 if no return type. | 
| abstract  boolean | hasMethodCall()Return TRUE if the expression is, or has, at least one method call; otherwise, return FALSE. | 
|  boolean | hasParens()Return TRUE if the original expression had parentheses; otherwise, return FALSE. | 
| abstract  boolean | hasPure()Return TRUE if the expression is, or has, a PURE clause; otherwise, return FALSE. | 
| abstract  boolean | hasReservedMethod(int type)Return TRUE if the expression is, or has, the specified reserved method call; otherwise, return FALSE. | 
| abstract  boolean | hasResult()Return TRUE if the expression contains RESULT; otherwise, return FALSE. | 
| abstract  boolean | hasUnreservedMethod(boolean any)Return TRUE if the method is any unreserved method (when any is TRUE) or it is an unreserved method with a throws clause (if any is FALSE); otherwise, return FALSE. | 
|  boolean | isValid()Return TRUE if the expression has been marked as having passed the validation checks; otherwise, return FALSE. | 
|  boolean | leftAssociative()Return trueiff the operator is parsed left to right. | 
| abstract  boolean | requiresExtendableContext()Return TRUE if extendable context is required to validate the expression; otherwise, return FALSE. | 
| abstract  boolean | requiresMethodContext()Return TRUE if method context is required to validate the expression; otherwise, return FALSE. | 
|  boolean | returnIsArray()Return TRUE if the return type is an array; otherwise, return FALSE. | 
|  boolean | returnIsBoolean()Return TRUE if the return type is a boolean; otherwise, return FALSE. | 
|  boolean | returnIsCharacter()Return TRUE if the return type is a character; otherwise, return FALSE. | 
|  boolean | returnIsDComplex()Return TRUE if the return type is a double complex; otherwise, return FALSE. | 
|  boolean | returnIsDouble()Return TRUE if the return type is a double; otherwise, return FALSE. | 
|  boolean | returnIsFComplex()Return TRUE if the return type is a float complex; otherwise, return FALSE. | 
|  boolean | returnIsFloat()Return TRUE if the return type is a float; otherwise, return FALSE. | 
|  boolean | returnIsInteger()Return TRUE if the return type is a integer; otherwise, return FALSE. | 
|  boolean | returnIsLong()Return TRUE if the return type is a long; otherwise, return FALSE. | 
|  boolean | returnIsNumericArray()Return TRUE if the return type is an array; otherwise, return FALSE. | 
|  boolean | returnIsOpaque()Return TRUE if the return type is a opaque; otherwise, return FALSE. | 
|  boolean | returnIsString()Return TRUE if the return type is a string; otherwise, return FALSE. | 
|  void | setParens(boolean parens)Sets the parens attribute to reflect whether or not the expression is specified to be contained within parentheses. | 
| protected  void | setReturnToBoolean()Set the return type to boolean. | 
| protected  void | setReturnToCharacter()Set the return type to character. | 
| protected  void | setReturnToDComplex()Set the return type to double complex. | 
| protected  void | setReturnToDouble()Set the return type to double. | 
| protected  void | setReturnToFComplex()Set the return type to float complex. | 
| protected  void | setReturnToFloat()Set the return type to float. | 
| protected  void | setReturnToInteger()Set the return type to integer. | 
| protected  void | setReturnToLong()Set the return type to long. | 
| protected  void | setReturnToOpaque()Set the return type to opaque. | 
| protected  void | setReturnToString()Set the return type to string. | 
| protected  void | setReturnType(int return_type)Set the return type associated with the expression based on the specified type value. | 
| protected  void | setReturnType(Type return_type)Set the return type associated with the expression based on the value associated with the specified return type. | 
| abstract  java.lang.String | toString()Return the stringified version of the expression (in SIDL form). | 
|  void | validateExpression(Extendable ext,
                   Method m)Validate this assertion expression within the context of the given extendable and optional method. | 
| protected abstract  void | validateSemantics(Extendable ext,
                  Method m)Validate the expression semantics, if necessary, within the context of the extendable and/or method. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
protected Context d_context
public static final java.lang.String ERROR_SEMANTIC_VALIDATION
| Constructor Detail | 
|---|
public AssertionExpression(boolean valid,
                           Context context)
valid - Use TRUE only if the expression is clearly valid from the 
                 start (e.g., most literals).| Method Detail | 
|---|
public void setParens(boolean parens)
parens - TRUE if the expression is known to be specified to be
                 contained within parentheses; FALSE otherwise.public boolean hasParens()
protected void setReturnType(int return_type)
                      throws AssertionException
return_type - A return type value for this expression.
AssertionException - The exception raised if the specified return type is 
                       still not determined.
protected void setReturnType(Type return_type)
                      throws AssertionException
return_type - A return type containing the value for this 
                       expression.
AssertionException - The exception raised if the specified return type is 
                       still not determined.public Type getReturnType()
public java.lang.String getReturnTypeName()
public int getReturnTypeValue()
public boolean returnIsArray()
public boolean returnIsBoolean()
public boolean returnIsCharacter()
public boolean returnIsDComplex()
public boolean returnIsDouble()
public boolean returnIsFComplex()
public boolean returnIsFloat()
public boolean returnIsInteger()
public boolean returnIsLong()
public boolean returnIsNumericArray()
public boolean returnIsOpaque()
public boolean returnIsString()
protected void setReturnToBoolean()
                           throws AssertionException
AssertionException
protected void setReturnToCharacter()
                             throws AssertionException
AssertionException
protected void setReturnToDComplex()
                            throws AssertionException
AssertionException
protected void setReturnToDouble()
                          throws AssertionException
AssertionException
protected void setReturnToFComplex()
                            throws AssertionException
AssertionException
protected void setReturnToFloat()
                         throws AssertionException
AssertionException
protected void setReturnToInteger()
                           throws AssertionException
AssertionException
protected void setReturnToLong()
                        throws AssertionException
AssertionException
protected void setReturnToOpaque()
                          throws AssertionException
AssertionException
protected void setReturnToString()
                          throws AssertionException
AssertionExceptionpublic boolean isValid()
public abstract boolean hasPure()
public abstract boolean hasResult()
public abstract boolean hasMethodCall()
public abstract boolean hasReservedMethod(int type)
public abstract boolean hasUnreservedMethod(boolean any)
public abstract boolean requiresExtendableContext()
public abstract boolean requiresMethodContext()
protected java.lang.String getExceptionPrefix(Extendable ext,
                                              Method m)
ext - The interface or class that owns this expression.m - The method that owns this expression.protected java.lang.String getExceptionPrefix(Extendable ext)
ext - The interface or class that owns this expression.
protected abstract void validateSemantics(Extendable ext,
                                          Method m)
                                   throws AssertionException
ext - The interface or class that owns this expression.m - The method that owns this expression.
AssertionException - The exception that can be raised during the validation.
public void validateExpression(Extendable ext,
                               Method m)
                        throws AssertionException
ext - The interface or class that owns this expression.m - The method that owns this expression.
AssertionException - The exception raised if sufficient context is unavailable
               or that can be propagated by validations.
public abstract java.util.ArrayList getArrayIterMacros(java.lang.String epvVar,
                                                       int[] startInd)
public abstract int getNumArrayIterMacrosByType(char type)
public abstract java.lang.String cExpression(java.lang.String epvVar,
                                             int[] startInd)
AssertionException - this indicates that the expression
 contained unsupported node types.public boolean leftAssociative()
true iff the operator is parsed left to right.
public abstract java.lang.String toString()
toString in class java.lang.Object
public abstract java.lang.Object accept(ExprVisitor ev,
                                        java.lang.Object data)
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||