Package org.pkl.core
Class TypeAlias
- java.lang.Object
-
- org.pkl.core.Member
-
- org.pkl.core.TypeAlias
-
- All Implemented Interfaces:
java.io.Serializable,Value
public final class TypeAlias extends Member implements Value
Java representation of apkl.base#TypeAliasvalue.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.pkl.core.Member
Member.SourceLocation
-
-
Constructor Summary
Constructors Constructor Description TypeAlias(@Nullable java.lang.String docComment, Member.SourceLocation sourceLocation, java.util.Set<Modifier> modifiers, java.util.List<PObject> annotations, java.lang.String simpleName, java.lang.String moduleName, java.lang.String qualifiedName, java.util.List<TypeParameter> typeParameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <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.PTypegetAliasedType()Returns the type that this type alias stands for.PClassInfo<?>getClassInfo()Returns information about the Pkl class associated with thisValue.java.lang.StringgetDisplayName()Returns the name of this type alias for use in user-facing messages.java.lang.StringgetModuleName()Returns the name of the module that this type alias is declared in.java.lang.StringgetQualifiedName()Returns the qualified name of this type alias, `moduleName#typeAliasName`.java.util.List<TypeParameter>getTypeParameters()voidinitAliasedType(PType type)java.lang.StringtoString()-
Methods inherited from class org.pkl.core.Member
getAnnotations, getDocComment, getModifiers, getSimpleName, getSourceLocation, isAbstract, isExternal, isHidden, isOpen, isStandardLibraryMember
-
-
-
-
Constructor Detail
-
TypeAlias
public TypeAlias(@Nullable java.lang.String docComment, Member.SourceLocation sourceLocation, java.util.Set<Modifier> modifiers, java.util.List<PObject> annotations, java.lang.String simpleName, java.lang.String moduleName, java.lang.String qualifiedName, java.util.List<TypeParameter> typeParameters)
-
-
Method Detail
-
initAliasedType
public void initAliasedType(PType type)
-
getModuleName
public java.lang.String getModuleName()
Returns the name of the module that this type alias 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
public java.lang.String getQualifiedName()
Returns the qualified name of this type alias, `moduleName#typeAliasName`. Note that a qualified type alias name is not guaranteed to be unique, especially if the module name is not declared but inferred from the module URI.
-
getDisplayName
public java.lang.String getDisplayName()
Returns the name of this type alias for use in user-facing messages.
-
getTypeParameters
public java.util.List<TypeParameter> getTypeParameters()
-
getAliasedType
public PType getAliasedType()
Returns the type that this type alias stands for.
-
accept
public void accept(ValueVisitor visitor)
Description copied from interface:ValueInvokes the given visitor's visit method for thisValue.
-
accept
public <T> T accept(ValueConverter<T> converter)
Description copied from interface:ValueInvokes the given converters's convert method for thisValue.
-
getClassInfo
public PClassInfo<?> getClassInfo()
Description copied from interface:ValueReturns information about the Pkl class associated with thisValue.- Specified by:
getClassInfoin interfaceValue
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-