Package org.codehaus.janino
Class Java.Rvalue
- java.lang.Object
-
- org.codehaus.janino.Java.Located
-
- org.codehaus.janino.Java.Atom
-
- org.codehaus.janino.Java.Rvalue
-
- All Implemented Interfaces:
Java.ArrayInitializerOrRvalue
,Java.ElementValue
,Java.Locatable
- Direct Known Subclasses:
Java.ArrayLength
,Java.Assignment
,Java.BooleanRvalue
,Java.Cast
,Java.ClassLiteral
,Java.ConditionalExpression
,Java.Crement
,Java.Instanceof
,Java.Invocation
,Java.Literal
,Java.Lvalue
,Java.NewAnonymousClassInstance
,Java.NewArray
,Java.NewClassInstance
,Java.NewInitializedArray
,Java.ParameterAccess
,Java.QualifiedThisReference
,Java.SimpleConstant
,Java.ThisReference
- Enclosing class:
- Java
public abstract static class Java.Rvalue extends Java.Atom implements Java.ArrayInitializerOrRvalue, Java.ElementValue
Representation of an "rvalue", i.e. an expression that has a type and a value, but cannot be assigned to: An expression that can be the right-hand-side of an assignment.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.Object
CONSTANT_VALUE_UNKNOWN
The special value for theconstantValue
field indicating that this rvalue does not have a constant value.(package private) java.lang.Object
constantValue
The constant value of this rvalue, orCONSTANT_VALUE_UNKNOWN
iff this rvalue does not have a constant value.private Java.BlockStatement
enclosingBlockStatement
-
Fields inherited from class org.codehaus.janino.Java.Located
NOWHERE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
accept(Visitor.RvalueVisitor rvv)
Java.BlockStatement
getEnclosingBlockStatement()
void
setEnclosingBlockStatement(Java.BlockStatement enclosingBlockStatement)
Sets enclosing block statement for this object and all subordinateJava.Rvalue
objects.Java.Rvalue
toRvalue()
-
Methods inherited from class org.codehaus.janino.Java.Atom
accept, toLvalue, toLvalueOrCompileException, toRvalueOrCompileException, toString, toType, toTypeOrCompileException
-
Methods inherited from class org.codehaus.janino.Java.Located
getLocation, throwCompileException
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.codehaus.janino.Java.ElementValue
accept
-
Methods inherited from interface org.codehaus.janino.Java.Locatable
getLocation, throwCompileException
-
-
-
-
Field Detail
-
enclosingBlockStatement
private Java.BlockStatement enclosingBlockStatement
-
CONSTANT_VALUE_UNKNOWN
static final java.lang.Object CONSTANT_VALUE_UNKNOWN
The special value for theconstantValue
field indicating that this rvalue does not have a constant value.
-
constantValue
java.lang.Object constantValue
The constant value of this rvalue, orCONSTANT_VALUE_UNKNOWN
iff this rvalue does not have a constant value.
-
-
Constructor Detail
-
Rvalue
protected Rvalue(Location location)
-
-
Method Detail
-
setEnclosingBlockStatement
public final void setEnclosingBlockStatement(Java.BlockStatement enclosingBlockStatement)
Sets enclosing block statement for this object and all subordinateJava.Rvalue
objects.
-
getEnclosingBlockStatement
public Java.BlockStatement getEnclosingBlockStatement()
- Returns:
- The enclosing block statement, as set with
setEnclosingBlockStatement(Java.BlockStatement)
-
toRvalue
public Java.Rvalue toRvalue()
- Overrides:
toRvalue
in classJava.Atom
- Returns:
- This atom, converted to
Java.Rvalue
, ornull
if this atom is not an rvalue
-
accept
public abstract void accept(Visitor.RvalueVisitor rvv)
-
-