Package org.pkl.core
Class PClass
java.lang.Object
org.pkl.core.Member
org.pkl.core.PClass
- All Implemented Interfaces:
Serializable,Value
Java representation of a
pkl.base#Class value.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final classstatic final classNested classes/interfaces inherited from class org.pkl.core.Member
Member.SourceLocation -
Constructor Summary
ConstructorsConstructorDescriptionPClass(@Nullable String docComment, Member.SourceLocation sourceLocation, Set<Modifier> modifiers, List<PObject> annotations, PClassInfo<?> classInfo, List<TypeParameter> typeParameters, Map<String, PClass.Property> properties, Map<String, PClass.Method> methods) -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(ValueConverter<T> converter) Invokes the given converters's convert method for thisValue.voidaccept(ValueVisitor visitor) Invokes the given visitor's visit method for thisValue.PClassInfo<?> Returns information about the Pkl class associated with thisValue.PClassInfo<?> getInfo()Returns the name of the module that this class is declared in.Returns the qualified name of this class, `moduleName#className`.voidinitSupertype(PType supertype, PClass superclass) booleanTells if this class is the class of a module.toString()Methods inherited from class org.pkl.core.Member
getAnnotations, getDocComment, getModifiers, getSimpleName, getSourceLocation, isAbstract, isExternal, isHidden, isOpen, isStandardLibraryMember
-
Constructor Details
-
PClass
public PClass(@Nullable @Nullable String docComment, Member.SourceLocation sourceLocation, Set<Modifier> modifiers, List<PObject> annotations, PClassInfo<?> classInfo, List<TypeParameter> typeParameters, Map<String, PClass.Property> properties, Map<String, PClass.Method> methods)
-
-
Method Details
-
initSupertype
-
getModuleName
Returns the name of the module that this class is declared in. Note that a module name is not guaranteed to be unique, especially if it not declared but inferred from the module URI.- Specified by:
getModuleNamein classMember
-
getQualifiedName
Returns the qualified name of this class, `moduleName#className`. Note that a qualified class name is not guaranteed to be unique, especially if the module name is not declared but inferred from the module URI. -
getDisplayName
-
getInfo
-
isModuleClass
public boolean isModuleClass()Tells if this class is the class of a module. -
getTypeParameters
-
getSupertype
-
getSuperclass
-
getProperties
-
getMethods
-
getAllProperties
-
getAllMethods
-
accept
Description copied from interface:ValueInvokes the given visitor's visit method for thisValue. -
accept
Description copied from interface:ValueInvokes the given converters's convert method for thisValue. -
getClassInfo
Description copied from interface:ValueReturns information about the Pkl class associated with thisValue.- Specified by:
getClassInfoin interfaceValue
-
toString
-