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 Modifier and Type Field Description (package private) static java.lang.ObjectCONSTANT_VALUE_UNKNOWNThe special value for theconstantValuefield indicating that the constant value of this rvalue has not yet been determined.(package private) java.lang.ObjectconstantValueThe constant value of this rvalue, orCONSTANT_VALUE_UNKNOWNiff the constant value of this rvalue has not yet been determined.private Java.ScopeenclosingScope-
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.ElementValueVisitorfor the concreteJava.ElementValuetype.abstract <R,EX extends java.lang.Throwable>
Raccept(Visitor.RvalueVisitor<R,EX> rvv)Java.ScopegetEnclosingScope()Java.ScopegetEnclosingScopeOrNull()voidsetEnclosingScope(Java.Scope enclosingScope)Sets the enclosing scope for this object and all subordinateJava.Rvalueobjects.Java.RvaluetoRvalue()-
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 Detail
-
enclosingScope
@Nullable private Java.Scope enclosingScope
-
CONSTANT_VALUE_UNKNOWN
static final java.lang.Object CONSTANT_VALUE_UNKNOWN
The special value for theconstantValuefield indicating that the constant value of this rvalue has not yet been determined.
-
constantValue
@Nullable java.lang.Object constantValue
The constant value of this rvalue, orCONSTANT_VALUE_UNKNOWNiff the constant value of this rvalue has not yet been determined.
-
-
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.ElementValueInvokes the "visit...()" method ofVisitor.ElementValueVisitorfor the concreteJava.ElementValuetype.- Specified by:
acceptin 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.Rvalueobjects.- Specified by:
setEnclosingScopein interfaceJava.ArrayInitializerOrRvalue- Specified by:
setEnclosingScopein 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:
toRvaluein classJava.Atom- Returns:
- This atom, converted to
Java.Rvalue, ornullif 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:
acceptin interfaceJava.ArrayInitializerOrRvalue- Throws:
EX extends java.lang.Throwable
-
-