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
-
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 <R,EX extends java.lang.Throwable>
Raccept(Visitor.ArrayInitializerOrRvalueVisitor<R,EX> visitor)
<R,EX extends java.lang.Throwable>
Raccept(Visitor.AtomVisitor<R,EX> visitor)
<R,EX extends java.lang.Throwable>
Raccept(Visitor.ElementValueVisitor<R,EX> visitor)
Invokes the "visit...()
" method ofVisitor.ElementValueVisitor
for the concreteJava.ElementValue
type.abstract <R,EX extends java.lang.Throwable>
Raccept(Visitor.RvalueVisitor<R,EX> rvv)
Java.Scope
getEnclosingScope()
Java.Scope
getEnclosingScopeOrNull()
void
setEnclosingScope(Java.Scope enclosingScope)
Sets the enclosing scope for this object and all subordinateJava.Rvalue
objects.Java.Rvalue
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
-
-
-
-
Constructor Detail
-
Rvalue
protected Rvalue(Location location)
-
-
Method Detail
-
accept
@Nullable public final <R,EX extends java.lang.Throwable> R accept(Visitor.ElementValueVisitor<R,EX> visitor) throws EX extends java.lang.Throwable
Description copied from interface:Java.ElementValue
Invokes the "visit...()
" method ofVisitor.ElementValueVisitor
for the concreteJava.ElementValue
type.- Specified by:
accept
in interfaceJava.ElementValue
- Throws:
EX extends java.lang.Throwable
-
setEnclosingScope
public final void setEnclosingScope(Java.Scope enclosingScope)
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
public Java.Scope getEnclosingScope()
- Returns:
- The enclosing scope, as set with
setEnclosingScope(Java.Scope)
-
getEnclosingScopeOrNull
@Nullable public Java.Scope getEnclosingScopeOrNull()
- Returns:
- The enclosing scope, as set with
setEnclosingScope(Java.Scope)
-
toRvalue
@Nullable 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
@Nullable public abstract <R,EX extends java.lang.Throwable> R accept(Visitor.RvalueVisitor<R,EX> rvv) throws EX extends java.lang.Throwable
- Throws:
EX extends java.lang.Throwable
-
accept
@Nullable public final <R,EX extends java.lang.Throwable> R accept(Visitor.AtomVisitor<R,EX> visitor) throws EX extends java.lang.Throwable
Description copied from class:Java.Atom
-
accept
@Nullable public final <R,EX extends java.lang.Throwable> R accept(Visitor.ArrayInitializerOrRvalueVisitor<R,EX> visitor) throws EX extends java.lang.Throwable
- Specified by:
accept
in interfaceJava.ArrayInitializerOrRvalue
- Throws:
EX extends java.lang.Throwable
-
-