Package org.pkl.core

Class Member

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    PClass, PClass.ClassMember, TypeAlias

    public abstract class Member
    extends java.lang.Object
    implements java.io.Serializable
    Common base class for TypeAlias, PClass, PClass.Property, and PClass.Method.
    See Also:
    Serialized Form
    • Method Detail

      • getModuleName

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

        public @Nullable java.lang.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 java.util.Set<Modifier> getModifiers()
        Returns the modifiers of this member.
      • getAnnotations

        public java.util.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 java.lang.String getSimpleName()
        Returns the unqualified name of this member.