public class FComplexLiteral extends Literal
d_context, ERROR_SEMANTIC_VALIDATION
Constructor and Description |
---|
FComplexLiteral(FloatLiteral r,
FloatLiteral i,
Context context)
Create a new object.
|
FComplexLiteral(LongLiteral r,
LongLiteral i,
Context context)
Create a new object.
|
Modifier and Type | Method and Description |
---|---|
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 |
getImaginaryImage()
Return the image of the imaginary part of the literal.
|
FloatLiteral |
getImaginaryLiteral()
Return the literal of the imaginary part of the literal.
|
java.lang.Float |
getImaginaryValue()
Return the value of the imaginary part of the literal.
|
int |
getNumArrayIterMacrosByType(char type)
Returns the number of macros supported by this assertion of the
specified type.
|
java.lang.String |
getRealImage()
Return the image of the real part of the literal.
|
FloatLiteral |
getRealLiteral()
Return the literal of the imaginary part of the literal.
|
java.lang.Float |
getRealValue()
Return the value of the real part of the literal.
|
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 is, or has, at least one method call;
otherwise, return false.
|
boolean |
hasPure()
Return TRUE if the expression is, or has, 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 |
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.
|
getExceptionPrefix, getExceptionPrefix, getReturnType, getReturnTypeName, getReturnTypeValue, hasParens, isValid, leftAssociative, returnIsArray, returnIsBoolean, returnIsCharacter, returnIsClass, returnIsDComplex, returnIsDouble, returnIsEnum, returnIsFComplex, returnIsFloat, returnIsInteger, returnIsInterface, returnIsLong, returnIsNumericArray, returnIsOpaque, returnIsString, setParens, setReturnToBoolean, setReturnToCharacter, setReturnToClass, setReturnToDComplex, setReturnToDouble, setReturnToEnum, setReturnToFComplex, setReturnToFloat, setReturnToInteger, setReturnToInterface, setReturnToLong, setReturnToOpaque, setReturnToString, setReturnType, setReturnType, validateExpression
public FComplexLiteral(FloatLiteral r, FloatLiteral i, Context context) throws AssertionException
r
- The real part of the number.i
- The imaginary part of the number.AssertionException
- The exception raised if error in any validation.public FComplexLiteral(LongLiteral r, LongLiteral i, Context context) throws AssertionException
r
- The long real part of the number.i
- The long imaginary part of the number.AssertionException
- The exception raised if error in any validation.public FloatLiteral getRealLiteral()
public java.lang.Float getRealValue()
public java.lang.String getRealImage()
public FloatLiteral getImaginaryLiteral()
public java.lang.Float getImaginaryValue()
public java.lang.String getImaginaryImage()
public boolean hasPure()
hasPure
in class AssertionExpression
public boolean hasResult()
hasResult
in class AssertionExpression
public boolean hasResultOrArg()
hasResultOrArg
in class AssertionExpression
public boolean hasResultOrOutArg(boolean outOnly)
hasResultOrOutArg
in class AssertionExpression
outOnly
- TRUE if only concerned with output arguments that are
out only; FALSE otherwise.public boolean hasMethodCall()
hasMethodCall
in class AssertionExpression
public int getDefaultComplexity()
getDefaultComplexity
in class AssertionExpression
public boolean hasBuiltinMethod(int type)
hasBuiltinMethod
in class AssertionExpression
public boolean hasUserDefinedMethod(boolean any)
hasUserDefinedMethod
in class AssertionExpression
public boolean requiresExtendableContext()
requiresExtendableContext
in class AssertionExpression
public boolean requiresMethodContext()
requiresMethodContext
in class AssertionExpression
protected void validateSemantics(Extendable ext, Method m) throws AssertionException
validateSemantics
in class AssertionExpression
ext
- The interface or class that owns this expression.m
- The method that owns this expression.AssertionException
- The exception that can be raised during any validation.public java.util.ArrayList getArrayIterMacros(java.lang.String epvVar, int[] startInd)
getArrayIterMacros
in class AssertionExpression
public int getNumArrayIterMacrosByType(char type)
getNumArrayIterMacrosByType
in class AssertionExpression
public java.lang.String cExpression(java.lang.String epvVar, int[] startInd)
cExpression
in class AssertionExpression
public java.lang.String toString()
toString
in class AssertionExpression
public java.lang.Object accept(ExprVisitor ev, java.lang.Object data)
accept
in class AssertionExpression