public class ValueAndType extends Object
Constructor and Description |
---|
ValueAndType(Value valueIn,
Type declaredTypeIn)
Creates a new ValueAndType.
|
ValueAndType(Value valueIn,
Type declaredTypeIn,
boolean needParenIn)
Creates a new ValueAndType.
|
Modifier and Type | Method and Description |
---|---|
Type |
getDeclaredType()
Gets the declared type.
|
boolean |
getNeedParen()
Determines if the expression that generated this ValueAndType can stand
alone in source code.
|
Value |
getValue()
Gets the value.
|
public ValueAndType(Value valueIn, Type declaredTypeIn)
valueIn
- the value.declaredTypeIn
- the declared type.public ValueAndType(Value valueIn, Type declaredTypeIn, boolean needParenIn)
valueIn
- the value.declaredTypeIn
- the declared type.needParenIn
- false if an expression was evaluated to produce this
ValueAndType and it is absolutely certain that the expression has the
same meaning anywhere in Java code when not parenthesized, true
otherwise.public Type getDeclaredType()
public boolean getNeedParen()
public Value getValue()