Class VmValue

java.lang.Object
org.pkl.core.runtime.VmValue
Direct Known Subclasses:
VmBytes, VmClass, VmCollection, VmDataSize, VmDuration, VmIntSeq, VmMap, VmNull, VmObjectLike, VmPair, VmRegex, VmTypeAlias

public abstract class VmValue extends Object
  • Constructor Details

    • VmValue

      public VmValue()
  • Method Details

    • getVmClass

      public abstract VmClass getVmClass()
    • getPrototype

      public VmTyped getPrototype()
    • isPrototype

      public boolean isPrototype()
    • isDynamic

      public boolean isDynamic()
    • isListing

      public boolean isListing()
    • isMapping

      public boolean isMapping()
    • isTyped

      public boolean isTyped()
    • isSequence

      public boolean isSequence()
      Tells if this value is a VmCollection, VmListing, or VmDynamic with elements.
    • force

      public abstract void force(boolean allowUndefinedValues)
      Forces recursive (deep) evaluation of this value.
    • export

      public abstract Object export()
    • accept

      public abstract void accept(VmValueVisitor visitor)
    • accept

      public abstract <T> T accept(VmValueConverter<T> converter, Iterable<Object> path)
    • force

      public static void force(Object value, boolean allowUndefinedValues)
      Forces recursive (deep) evaluation of the given value.
    • export

      public static Object export(Object value)
      Used to export values other than object member values. Such values aren't `@Nullable` (but can be `VmNull`).
    • exportNullable

      @Nullable public static @Nullable Object exportNullable(@Nullable @Nullable Object value)
      Used to export object member values. Such values are `null` if they haven't been forced.
    • equals

      public abstract boolean equals(Object obj)
      Enables calling `vmValue.equals()` when not behind a Truffle boundary.
      Overrides:
      equals in class Object