Package org.pkl.core.runtime
Class VmValue
- java.lang.Object
-
- org.pkl.core.runtime.VmValue
-
- Direct Known Subclasses:
VmClass,VmCollection,VmDataSize,VmDuration,VmIntSeq,VmMap,VmNull,VmObjectLike,VmPair,VmRegex,VmTypeAlias
public abstract class VmValue extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description VmValue()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract <T> Taccept(VmValueConverter<T> converter, java.lang.Iterable<java.lang.Object> path)abstract voidaccept(VmValueVisitor visitor)abstract booleanequals(java.lang.Object obj)Enables calling `vmValue.equals()` when not behind a Truffle boundary.abstract java.lang.Objectexport()static java.lang.Objectexport(java.lang.Object value)Used to export values other than object member values.static @Nullable java.lang.ObjectexportNullable(@Nullable java.lang.Object value)Used to export object member values.abstract voidforce(boolean allowUndefinedValues)Forces recursive (deep) evaluation of this value.static voidforce(java.lang.Object value, boolean allowUndefinedValues)Forces recursive (deep) evaluation of the given value.VmTypedgetPrototype()abstract VmClassgetVmClass()booleanisDynamic()booleanisListing()booleanisMapping()booleanisPrototype()booleanisSequence()booleanisTyped()
-
-
-
Method Detail
-
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()
-
force
public abstract void force(boolean allowUndefinedValues)
Forces recursive (deep) evaluation of this value.
-
export
public abstract java.lang.Object export()
-
accept
public abstract void accept(VmValueVisitor visitor)
-
accept
public abstract <T> T accept(VmValueConverter<T> converter, java.lang.Iterable<java.lang.Object> path)
-
force
public static void force(java.lang.Object value, boolean allowUndefinedValues)Forces recursive (deep) evaluation of the given value.
-
export
public static java.lang.Object export(java.lang.Object value)
Used to export values other than object member values. Such values aren't `@Nullable` (but can be `VmNull`).
-
exportNullable
public static @Nullable java.lang.Object exportNullable(@Nullable java.lang.Object value)
Used to export object member values. Such values are `null` if they haven't been forced.
-
equals
public abstract boolean equals(java.lang.Object obj)
Enables calling `vmValue.equals()` when not behind a Truffle boundary.- Overrides:
equalsin classjava.lang.Object
-
-