Interface Value

All Known Implementing Classes:
Value.Constructed, Value.Field, Value.InstanceCall, Value.Lambda, Value.Literal, Value.Multiple, Value.StaticCall, 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 
    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 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 
    A static call, className.methodName(args).
    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