Class BytecodeExpression

java.lang.Object
io.airlift.bytecode.expression.BytecodeExpression
All Implemented Interfaces:
BytecodeNode
Direct Known Subclasses:
ArithmeticBytecodeExpression, Variable

public abstract class BytecodeExpression extends Object implements BytecodeNode
A BytecodeExpression is chain of Java like expressions that results in at most a single value being pushed on the stack. The chain starts with a constant, local variable, static field, static method or invoke dynamic followed by zero or more invocations, field dereferences, array element fetches, or casts. The expression can optionally be terminated by a set expression, and in this case no value is pushed on the stack.

A BytecodeExpression is a BytecodeNode so it works with tools like tree dump.

This abstraction makes it easy to write generic byte code generators that can work with data that may come from a parameter, field or the result of a method invocation.