public abstract class Expression extends Object
Modifier and Type | Field and Description |
---|---|
static BigInteger |
llMax |
static BigInteger |
llMin |
static BigInteger |
lMax |
static BigInteger |
lMin |
static BigInteger |
negOne |
static BigInteger |
one |
static BigInteger |
sMax |
static BigInteger |
sMin |
static BigInteger |
two |
static BigInteger |
twoPow15 |
static BigInteger |
twoPow16 |
static BigInteger |
twoPow31 |
static BigInteger |
twoPow32 |
static BigInteger |
twoPow63 |
static BigInteger |
twoPow64 |
static BigInteger |
ullMax |
static BigInteger |
ullMin |
static BigInteger |
ulMax |
static BigInteger |
ulMin |
static BigInteger |
usMax |
static BigInteger |
usMin |
static BigInteger |
zero |
Constructor and Description |
---|
Expression() |
Modifier and Type | Method and Description |
---|---|
Object |
coerceToTarget(Object obj)
Coerces a number to the target type of this expression.
|
protected static String |
defaultType(String targetType)
Return the default computation type for the given target type.
|
abstract Object |
evaluate()
Compute the value of this expression.
|
String |
rep()
Get the representation of this expression.
|
void |
rep(String rep)
Set the representation of this expression.
|
protected BigInteger |
toSignedTarget(BigInteger b)
Coerces an integral value (BigInteger) to its corresponding signed
representation, if the target type of this expression is signed.
|
protected BigInteger |
toUnsigned(BigInteger b)
Return the unsigned value of a BigInteger.
|
protected BigInteger |
toUnsignedTarget(BigInteger b)
Coerces an integral value (BigInteger) to its corresponding unsigned
representation, if the target type of this expression is unsigned.
|
String |
type()
Get the target type of this expression.
|
void |
type(String type)
Set the target type of this expression.
|
Object |
value()
Get the value of this expression.
|
void |
value(Object value)
Set the value of this expression.
|
public static final BigInteger negOne
public static final BigInteger zero
public static final BigInteger one
public static final BigInteger two
public static final BigInteger twoPow15
public static final BigInteger twoPow16
public static final BigInteger twoPow31
public static final BigInteger twoPow32
public static final BigInteger twoPow63
public static final BigInteger twoPow64
public static final BigInteger sMax
public static final BigInteger sMin
public static final BigInteger usMax
public static final BigInteger usMin
public static final BigInteger lMax
public static final BigInteger lMin
public static final BigInteger ulMax
public static final BigInteger ulMin
public static final BigInteger llMax
public static final BigInteger llMin
public static final BigInteger ullMax
public static final BigInteger ullMin
public abstract Object evaluate() throws EvaluationException
EvaluationException
public void value(Object value)
public Object value()
public void rep(String rep)
public String rep()
public void type(String type)
public String type()
protected static String defaultType(String targetType)
public Object coerceToTarget(Object obj)
obj
- The number to coerce.protected BigInteger toUnsignedTarget(BigInteger b)
b
- The BigInteger to be coerced.protected BigInteger toSignedTarget(BigInteger b)
b
- The BigInteger to be coerced.protected BigInteger toUnsigned(BigInteger b)
Copyright © 2017 JBoss by Red Hat. All rights reserved.