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`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`Rvalue(Location location)`

## Method Summary

Modifier and Type
Method
Description
`final <R, EX extends Throwable>
R`
`accept(Visitor.ArrayInitializerOrRvalueVisitor<R,EX> visitor)`
`final <R, EX extends Throwable>
R`
`accept(Visitor.AtomVisitor<R,EX> visitor)`
Invokes the "`visit...()`" method of `Visitor.AtomVisitor` for the concrete `Java.Atom` type.
`final <R, EX extends Throwable>
R`
`accept(Visitor.ElementValueVisitor<R,EX> visitor)`
Invokes the "`visit...()`" method of `Visitor.ElementValueVisitor` for the concrete `Java.ElementValue` type.
`abstract <R, EX extends Throwable>
R`
`accept(Visitor.RvalueVisitor<R,EX> rvv)`
Invokes the "`visit...()`" method of `Visitor.RvalueVisitor` for the concrete `Java.Rvalue` type.
`Java.Scope`
`getEnclosingScope()`
`Java.Scope`
`getEnclosingScopeOrNull()`
`final void`
`setEnclosingScope(Java.Scope enclosingScope)`
Sets the enclosing scope for this object and all subordinate `Java.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 Details

### Rvalue

protected Rvalue(Location location)

## Method Details

### accept

@Nullable public final <R, EX extends Throwable> R accept(Visitor.ElementValueVisitor<R,EX> visitor) throws EX
Description copied from interface: `Java.ElementValue`
Invokes the "`visit...()`" method of `Visitor.ElementValueVisitor` for the concrete `Java.ElementValue` type.

Specified by:
  `accept` in interface `Java.ElementValue`
Throws:
  `EX`

### setEnclosingScope

public final void setEnclosingScope(Java.Scope enclosingScope)
Sets the enclosing scope for this object and all subordinate `Java.Rvalue` objects.

Specified by:
  `setEnclosingScope` in interface `Java.ArrayInitializerOrRvalue`
Specified by:
  `setEnclosingScope` in interface `Java.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 class `Java.Atom`
Returns:
  This atom, converted to `Java.Rvalue`, or `null` if this atom is not an rvalue

### accept

@Nullable public abstract <R, EX extends Throwable> R accept(Visitor.RvalueVisitor<R,EX> rvv) throws EX
Invokes the "`visit...()`" method of `Visitor.RvalueVisitor` for the concrete `Java.Rvalue` type.

Throws:
  `EX`

### accept

@Nullable public final <R, EX extends Throwable> R accept(Visitor.AtomVisitor<R,EX> visitor) throws EX
Description copied from class: `Java.Atom`
Invokes the "`visit...()`" method of `Visitor.AtomVisitor` for the concrete `Java.Atom` type.

Specified by:
  `accept` in class `Java.Atom`
Throws:
  `EX`

### accept

@Nullable public final <R, EX extends Throwable> R accept(Visitor.ArrayInitializerOrRvalueVisitor<R,EX> visitor) throws EX

Specified by:
  `accept` in interface `Java.ArrayInitializerOrRvalue`
Throws:
  `EX`