Package org.pkl.core

Class Member

java.lang.Object
org.pkl.core.Member
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PClass, PClass.ClassMember, TypeAlias

public abstract class Member extends Object implements Serializable
Common base class for TypeAlias, PClass, PClass.Property, and PClass.Method.
See Also:
  • Constructor Details

  • Method Details

    • getModuleName

      public abstract String getModuleName()
      Returns the name of the module that this member is declared in.
    • getDocComment

      @Nullable public @Nullable String getDocComment()
      Returns the documentation comment of this member.
    • getSourceLocation

      public Member.SourceLocation getSourceLocation()
      Returns the source location, such as start and end line, of this member.
    • getModifiers

      public Set<Modifier> getModifiers()
      Returns the modifiers of this member.
    • getAnnotations

      public List<PObject> getAnnotations()
      Returns the annotations of this member.
    • isExternal

      public boolean isExternal()
      Tells if this member has an external modifier.
    • isAbstract

      public boolean isAbstract()
      Tells if this member has an abstract modifier.
    • isHidden

      public boolean isHidden()
      Tells if this member has a hidden modifier.
    • isOpen

      public boolean isOpen()
      Tells if this member has an open modifier.
    • isStandardLibraryMember

      public final boolean isStandardLibraryMember()
      Tells if this member is defined in Pkl's standard library.
    • getSimpleName

      public String getSimpleName()
      Returns the unqualified name of this member.