Interface Value

All Known Implementing Classes:
Value.Array, Value.Conditional, Value.Constructed, Value.Field, Value.InstanceCall, Value.InstanceField, Value.InstanceOf, Value.Lambda, Value.Literal, Value.Multiple, Value.Operation, Value.Parameter, Value.StaticCall, Value.This, Value.Uninitialized, Value.Unknown

A value as reconstructed from bytecode, describing how it was built rather than what it is.

Most code reads values through a Conduit instead. This is what a Trace holds, and what a conduit method or handler parameter declared as Value receives.

Class names are internal names, such as com/example/Color.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    An array created with a constant length, and what was stored in it.
    static final record 
    A value that depends on a branch, as in condition ? then : otherwise.
    static final record 
    A constructor call, new className(args).
    static final record 
    A field read that could not be resolved further.
    static final record 
    An instance call, receiver.methodName(args).
    static final record 
    A field read from an object, holding whatever the field contained when the method began.
    static final record 
    Whether a value is an instance of a class, as a boolean.
    static final record 
    A lambda or method reference, with the method it was compiled to and what it captured.
    static final record 
    A compile-time constant, such as a string or a boxed number, or null.
    static final record 
    Every value a branching method can return.
    static final record 
    An operation over values that are not all constant.
    static enum 
    An operator of an Value.Operation.
    static final record 
    An argument of a summarised method, standing for whatever the caller passes.
    static final record 
    A static call, className.methodName(args).
    static final record 
    The object a summarised method was called on.
    static final record 
    An object between new and its constructor call.
    static final record 
    Anything the interpreter could not reconstruct.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static Value
    Wraps a constant as a value.
  • Method Details

    • literal

      static Value literal(Object v)
      Wraps a constant as a value.
      Parameters:
      v - a constant, or null
      Returns:
      the constant as a value