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.ArrayCreationReference
,Java.ArrayLength
,Java.Assignment
,Java.BooleanRvalue
,Java.Cast
,Java.ClassInstanceCreationReference
,Java.ClassLiteral
,Java.ConditionalExpression
,Java.Crement
,Java.Instanceof
,Java.Invocation
,Java.LambdaExpression
,Java.Literal
,Java.Lvalue
,Java.MethodReference
,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
FieldsModifier and TypeFieldDescription(package private) static final Object
The special value for theconstantValue
field indicating that the constant value of this rvalue has not yet been determined.(package private) Object
The constant value of this rvalue, orCONSTANT_VALUE_UNKNOWN
iff the constant value of this rvalue has not yet been determined.private Java.Scope
Fields inherited from class org.codehaus.janino.Java.Located
NOWHERE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal <R,
EX extends Throwable>
Raccept
(Visitor.ArrayInitializerOrRvalueVisitor<R, EX> visitor) final <R,
EX extends Throwable>
Raccept
(Visitor.AtomVisitor<R, EX> visitor) final <R,
EX extends Throwable>
Raccept
(Visitor.ElementValueVisitor<R, EX> visitor) Invokes the "visit...()
" method ofVisitor.ElementValueVisitor
for the concreteJava.ElementValue
type.abstract <R,
EX extends Throwable>
Raccept
(Visitor.RvalueVisitor<R, EX> rvv) final void
setEnclosingScope
(Java.Scope enclosingScope) Sets the enclosing scope for this object and all subordinateJava.Rvalue
objects.toRvalue()
Methods inherited from class org.codehaus.janino.Java.Atom
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.Locatable
getLocation, throwCompileException
-
Field Details
-
enclosingScope
-
CONSTANT_VALUE_UNKNOWN
The special value for theconstantValue
field indicating that the constant value of this rvalue has not yet been determined. -
constantValue
The constant value of this rvalue, orCONSTANT_VALUE_UNKNOWN
iff the constant value of this rvalue has not yet been determined.
-
-
Constructor Details
-
Rvalue
-
-
Method Details
-
accept
@Nullable public final <R,EX extends Throwable> R accept(Visitor.ElementValueVisitor<R, EX> visitor) throws EXDescription copied from interface:Java.ElementValue
Invokes the "visit...()
" method ofVisitor.ElementValueVisitor
for the concreteJava.ElementValue
type.- Specified by:
accept
in interfaceJava.ElementValue
- Throws:
EX
-
setEnclosingScope
Sets the enclosing scope for this object and all subordinateJava.Rvalue
objects.- Specified by:
setEnclosingScope
in interfaceJava.ArrayInitializerOrRvalue
- Specified by:
setEnclosingScope
in interfaceJava.ElementValue
-
getEnclosingScope
- Returns:
- The enclosing scope, as set with
setEnclosingScope(Java.Scope)
-
getEnclosingScopeOrNull
- Returns:
- The enclosing scope, as set with
setEnclosingScope(Java.Scope)
-
toRvalue
- Overrides:
toRvalue
in classJava.Atom
- Returns:
- This atom, converted to
Java.Rvalue
, ornull
if this atom is not an rvalue
-
accept
@Nullable public abstract <R,EX extends Throwable> R accept(Visitor.RvalueVisitor<R, EX> rvv) throws EX- Throws:
EX
-
accept
@Nullable public final <R,EX extends Throwable> R accept(Visitor.AtomVisitor<R, EX> visitor) throws EXDescription copied from class:Java.Atom
-
accept
@Nullable public final <R,EX extends Throwable> R accept(Visitor.ArrayInitializerOrRvalueVisitor<R, EX> visitor) throws EX- Specified by:
accept
in interfaceJava.ArrayInitializerOrRvalue
- Throws:
EX
-