|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.llnl.babel.symbols.AssertionExpression
gov.llnl.babel.symbols.Literal
gov.llnl.babel.symbols.IdentifierLiteral
public class IdentifierLiteral
| Field Summary | |
|---|---|
static int |
ARGUMENT
|
static int |
IN
|
static int |
INOUT
|
static int |
NULL
|
static int |
OUT
|
static int |
PURE
|
static int |
RESULT
|
| Fields inherited from class gov.llnl.babel.symbols.AssertionExpression |
|---|
d_context, ERROR_SEMANTIC_VALIDATION |
| Constructor Summary | |
|---|---|
IdentifierLiteral(java.lang.String id,
Context context)
Construct a new object. |
|
| Method Summary | |
|---|---|
java.lang.Object |
accept(ExprVisitor ev,
java.lang.Object data)
Implement the "visitor pattern". |
java.lang.String |
cExpression(java.lang.String epvVar,
int[] startInd)
Return the C version of the expression. |
java.util.ArrayList |
getArrayIterMacros(java.lang.String epvVar,
int[] startInd)
Return the list of array iteration macro messages, if any. |
int |
getDefaultComplexity()
Return the default complexity of the expression (0 = constant, 1 = linear, etc.). |
java.lang.String |
getIdentifier()
Return the identifier. |
int |
getIdentifierType()
Return the identifier type. |
java.lang.String |
getIdentifierTypeName()
Return the name of the identifier type. |
int |
getNumArrayIterMacrosByType(char type)
Returns the number of macros supported by this assertion of the specified type. |
boolean |
hasBuiltinMethod(int type)
Return TRUE if the expression is, or has, the specified built-in method call; otherwise, return FALSE. |
boolean |
hasMethodCall()
Return TRUE if the expression has at least one method call; otherwise, return FALSE. |
boolean |
hasPure()
Return TRUE if the expression is a PURE clause; otherwise, return FALSE. |
boolean |
hasResult()
Return TRUE if the expression contains RESULT; otherwise, return FALSE. |
boolean |
hasResultOrArg()
Return TRUE if a result clause or method argument is found within the expression; otherwise, return FALSE. |
boolean |
hasResultOrOutArg(boolean outOnly)
Return TRUE if a result clause or output argument is found within the expression; otherwise, return FALSE. |
boolean |
hasUserDefinedMethod(boolean any)
Return TRUE if the expression has a method AND the method is any user-defined method (when any is TRUE) or it is an user-defined method with a throws clause (if any is FALSE); otherwise, return FALSE. |
boolean |
isArgument()
Return TRUE if the identifier is ARGUMENT; otherwise, return FALSE. |
boolean |
isNull()
Return TRUE if the identifier is NULL; otherwise, return FALSE. |
boolean |
isReserved()
Return TRUE if the identifier is a reserved keyword; otherwise, return FALSE. |
boolean |
requiresExtendableContext()
Return TRUE if extendable context is required to validate the expression; otherwise, return FALSE. |
boolean |
requiresMethodContext()
Return TRUE if method context is required to validate the expression; otherwise, return FALSE. |
java.lang.String |
toString()
Return the stringified version of the expression (in SIDL form). |
protected void |
validateSemantics(Extendable ext,
Method m)
Validate the expression semantics, if necessary, within the context of the extendable and optional method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int ARGUMENT
public static final int NULL
public static final int PURE
public static final int RESULT
public static final int IN
public static final int INOUT
public static final int OUT
| Constructor Detail |
|---|
public IdentifierLiteral(java.lang.String id,
Context context)
throws AssertionException
id - The string identifier.
AssertionException - An exception that could be raised during any validation.| Method Detail |
|---|
public java.lang.String getIdentifier()
public int getIdentifierType()
public boolean isNull()
public boolean isArgument()
public boolean isReserved()
public java.lang.String getIdentifierTypeName()
public boolean hasPure()
hasPure in class AssertionExpressionpublic boolean hasResult()
hasResult in class AssertionExpressionpublic boolean hasResultOrArg()
hasResultOrArg in class AssertionExpressionpublic boolean hasResultOrOutArg(boolean outOnly)
hasResultOrOutArg in class AssertionExpressionoutOnly - TRUE if only concerned with output arguments that are
out only; FALSE otherwise.public boolean hasMethodCall()
hasMethodCall in class AssertionExpressionpublic int getDefaultComplexity()
getDefaultComplexity in class AssertionExpressionpublic boolean hasBuiltinMethod(int type)
hasBuiltinMethod in class AssertionExpressionpublic boolean hasUserDefinedMethod(boolean any)
hasUserDefinedMethod in class AssertionExpressionpublic boolean requiresExtendableContext()
requiresExtendableContext in class AssertionExpressionpublic boolean requiresMethodContext()
requiresMethodContext in class AssertionExpression
protected void validateSemantics(Extendable ext,
Method m)
throws AssertionException
validateSemantics in class AssertionExpressionext - The interface or class that owns this expression.m - The method that owns this expression.
AssertionException - The exception raised if errors in any validation.
public java.util.ArrayList getArrayIterMacros(java.lang.String epvVar,
int[] startInd)
getArrayIterMacros in class AssertionExpressionpublic int getNumArrayIterMacrosByType(char type)
getNumArrayIterMacrosByType in class AssertionExpression
public java.lang.String cExpression(java.lang.String epvVar,
int[] startInd)
cExpression in class AssertionExpressionpublic java.lang.String toString()
toString in class AssertionExpression
public java.lang.Object accept(ExprVisitor ev,
java.lang.Object data)
accept in class AssertionExpression
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||