Class Java.Lvalue

All Implemented Interfaces:
Direct Known Subclasses:
Java.AmbiguousName, Java.ArrayAccessExpression, Java.FieldAccessExpression
Enclosing class:

public abstract static class Java.Lvalue
extends Java.Rvalue

Representation of an "lvalue", i.e. an expression that has a type and a value, and can be assigned to: An expression that can be the left-hand-side of an assignment.

Fields inherited from class net.janino.Java.Rvalue
Constructor Summary
protected Java.Lvalue(Scanner.Location location)
Method Summary
abstract  void compileSet(ClassFile.CodeAttribute codeAttribute, IClass valueType, java.lang.Object optionalConstantValue)
          Generates code that stores a value in the Java.Lvalue.
Methods inherited from class net.janino.Java.Rvalue
compile, compileBoolean, compileContext, compileGet, compileGetValue, getConstantValue, getNegatedConstantValue
Methods inherited from class net.janino.Java.Atom
getLocation, getType, isType, throwCompileException, throwParseException, toLvalue, toRvalue, toType
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


protected Java.Lvalue(Scanner.Location location)
Method Detail


public abstract void compileSet(ClassFile.CodeAttribute codeAttribute,
                                IClass valueType,
                                java.lang.Object optionalConstantValue)
                         throws Java.CompileException
Generates code that stores a value in the Java.Lvalue. Expects the Java.Lvalue's context (see Java.Rvalue.compileContext(net.janino.ClassFile.CodeAttribute)) and a value of type "valueType" on the operand stack.

If optionalConstantValue is not null, then the stack top value is identical to it; this allows for "primitive constant assignment conversion" (JLS 5.2).