Package org.pkl.core

Class TypeAlias

java.lang.Object
org.pkl.core.Member
org.pkl.core.TypeAlias
All Implemented Interfaces:
Serializable, Value

public final class TypeAlias extends Member implements Value
Java representation of a pkl.base#TypeAlias value.
See Also:
  • Constructor Details

  • Method Details

    • initAliasedType

      public void initAliasedType(PType type)
    • getModuleName

      public 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:
      getModuleName in class Member
    • getQualifiedName

      public 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 String getDisplayName()
      Returns the name of this type alias for use in user-facing messages.
    • getTypeParameters

      public 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: Value
      Invokes the given visitor's visit method for this Value.
      Specified by:
      accept in interface Value
    • accept

      public <T> T accept(ValueConverter<T> converter)
      Description copied from interface: Value
      Invokes the given converters's convert method for this Value.
      Specified by:
      accept in interface Value
    • getClassInfo

      public PClassInfo<?> getClassInfo()
      Description copied from interface: Value
      Returns information about the Pkl class associated with this Value.
      Specified by:
      getClassInfo in interface Value
    • toString

      public String toString()
      Overrides:
      toString in class Object