Package org.pkl.core.runtime
Class VmClass
java.lang.Object
org.pkl.core.runtime.VmValue
org.pkl.core.runtime.VmClass
-
Constructor Summary
ConstructorsConstructorDescriptionVmClass(com.oracle.truffle.api.source.SourceSection sourceSection, com.oracle.truffle.api.source.SourceSection headerSection, com.oracle.truffle.api.source.SourceSection @Nullable [] docComment, List<VmTyped> annotations, int modifiers, PClassInfo<?> classInfo, List<TypeParameter> typeParameters, VmTyped prototype) -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(VmValueConverter<T> converter, Iterable<Object> path) voidaccept(VmValueVisitor visitor) voidaddMethod(ClassMethod method) voidaddMethods(Iterable<ClassMethod> methods) voidaddProperties(Iterable<ClassProperty> properties) voidaddProperty(ClassProperty property) booleanEnables calling `vmValue.equals()` when not behind a Truffle boundary.export()voidforce(boolean allowUndefinedValues) Forces recursive (deep) evaluation of this value.org.graalvm.collections.UnmodifiableEconomicSet<Object> Returns the names of all hidden properties defined in this class and its superclasses.org.graalvm.collections.UnmodifiableEconomicSet<Object> Returns the names of all non-hidden non-local non-external properties defined in this class and its superclasses.getDeclaredMethod(Identifier name) Does return local methods.Includes local methods.Returns all properties declared in this class.Returns the property with the given name declared in this class, ornullif no such property was found.com.oracle.truffle.api.source.SourceSection @Nullable []org.graalvm.collections.EconomicMap<Object, ObjectMember> com.oracle.truffle.api.source.SourceSectionorg.graalvm.collections.EconomicMap<Object, ObjectMember> getMethod(Identifier name) Does not return local methods.Does not include local methods.Returns the module that this class is declared in.PClassInfo<?> getProperty(Identifier name) Returns the property with the given name declared in this class or a superclass, ornullif no such property was found.Returns the qualified name of this class, `# `. com.oracle.truffle.api.source.SourceSectionorg.graalvm.collections.EconomicMap<Object, ObjectMember> intbooleanhasDeclaredMethod(Identifier name) Includes local methods.inthashCode()booleanhasProperty(Identifier name) Shorthand forgetProperty(name) != null.voidinitSupertype(TypeNode supertypeNode, VmClass superclass) booleanbooleanbooleanisClosed()booleanbooleanbooleanbooleanbooleanbooleanisHiddenProperty(Object key) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisOpen()booleanbooleanbooleanisSubclassOf(VmClass other) booleanisSuperclassOf(VmClass other) booleanvoidtoString()voidvisitMethodDefsTopDown(Consumer<ClassMethod> visitor) Methods inherited from class org.pkl.core.runtime.VmValue
export, exportNullable, force, isDynamic, isListing, isMapping, isPrototype, isSequence, isTyped
-
Constructor Details
-
VmClass
public VmClass(com.oracle.truffle.api.source.SourceSection sourceSection, com.oracle.truffle.api.source.SourceSection headerSection, com.oracle.truffle.api.source.SourceSection @Nullable [] docComment, List<VmTyped> annotations, int modifiers, PClassInfo<?> classInfo, List<TypeParameter> typeParameters, VmTyped prototype)
-
-
Method Details
-
initSupertype
-
addProperty
-
addProperties
-
addMethod
-
addMethods
-
notifyInitialized
public void notifyInitialized() -
getTypeParameterCount
public int getTypeParameterCount() -
getDeclaredProperty
Returns the property with the given name declared in this class, ornullif no such property was found. Does return local properties. -
getDeclaredProperties
Returns all properties declared in this class. Does include local properties. -
getVmClass
- Specified by:
getVmClassin classVmValue
-
getSourceSection
public com.oracle.truffle.api.source.SourceSection getSourceSection() -
getHeaderSection
public com.oracle.truffle.api.source.SourceSection getHeaderSection() -
getDocComment
-
getAnnotations
-
getModuleName
-
getModule
Returns the module that this class is declared in. For a module class, returns the corresponding module. -
getModuleMirror
-
getSimpleName
-
getQualifiedName
Returns the qualified name of this class, `# `. Note that a qualified class name isn't guaranteed to be unique, especially if the module name is not declared but inferred. -
getDisplayName
-
getPClassInfo
-
isHiddenProperty
-
getProperty
Returns the property with the given name declared in this class or a superclass, ornullif no such property was found. Does not return local properties. -
hasProperty
Shorthand forgetProperty(name) != null. -
getAllRegularPropertyNames
Returns the names of all non-hidden non-local non-external properties defined in this class and its superclasses. -
getAllHiddenPropertyNames
Returns the names of all hidden properties defined in this class and its superclasses. -
hasDeclaredMethod
Includes local methods. -
getDeclaredMethod
Does return local methods. -
getDeclaredMethods
Includes local methods. -
getMethod
Does not return local methods. -
getMethods
Does not include local methods. -
getSuperclass
-
getPrototype
- Overrides:
getPrototypein classVmValue
-
isAbstract
public boolean isAbstract() -
isExternal
public boolean isExternal() -
isOpen
public boolean isOpen() -
isClosed
public boolean isClosed() -
isInstantiable
public boolean isInstantiable() -
isNullClass
public boolean isNullClass() -
isCollectionClass
public boolean isCollectionClass() -
isListClass
public boolean isListClass() -
isSetClass
public boolean isSetClass() -
isMapClass
public boolean isMapClass() -
isListingClass
public boolean isListingClass() -
isMappingClass
public boolean isMappingClass() -
isDynamicClass
public boolean isDynamicClass() -
isPairClass
public boolean isPairClass() -
isFunctionClass
public boolean isFunctionClass() -
isFunctionNClass
public boolean isFunctionNClass() -
isModuleClass
public boolean isModuleClass() -
isClassClass
public boolean isClassClass() -
isVarArgsClass
public boolean isVarArgsClass() -
isSuperclassOf
-
isSubclassOf
-
visitMethodDefsTopDown
-
force
public void force(boolean allowUndefinedValues) Description copied from class:VmValueForces recursive (deep) evaluation of this value. -
getMirror
-
getTypedToDynamicMembers
-
getDynamicToTypedMembers
-
getMapToTypedMembers
-
getModifierMirrors
-
getTypeParameterMirrors
-
getSuperclassMirror
-
getSupertypeMirror
-
getPropertyMirrors
-
getAllPropertyMirrors
-
getMethodMirrors
-
getAllMethodMirrors
-
export
-
accept
-
accept
-
toString
-
equals
Description copied from class:VmValueEnables calling `vmValue.equals()` when not behind a Truffle boundary. -
hashCode
public int hashCode()
-