Package org.pkl.core.ast.member
Class ObjectMember
- java.lang.Object
-
- org.pkl.core.ast.member.Member
-
- org.pkl.core.ast.member.ObjectMember
-
public final class ObjectMember extends Member
-
-
Field Summary
-
Fields inherited from class org.pkl.core.ast.member.Member
headerSection, modifiers, name, qualifiedName, sourceSection
-
-
Constructor Summary
Constructors Constructor Description ObjectMember(com.oracle.truffle.api.source.SourceSection sourceSection, com.oracle.truffle.api.source.SourceSection headerSection, int modifiers, @Nullable Identifier name, java.lang.String qualifiedName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(@Nullable java.lang.Object obj)com.oracle.truffle.api.source.SourceSectiongetBodySection()@Nullable java.lang.StringgetCallSignature()For use in user-facing messages.com.oracle.truffle.api.RootCallTargetgetCallTarget()@Nullable java.lang.ObjectgetConstantValue()@Nullable java.lang.ObjectgetLocalPropertyDefaultValue()@Nullable MemberNodegetMemberNode()inthashCode()voidinitConstantValue(java.lang.Object value)voidinitConstantValue(ConstantNode node)voidinitMemberNode(MemberNode node)booleanisElement()Tells if this member is an element.booleanisEntry()Tells if this member is an entry.booleanisProp()Tells if this member is a property.booleanisUndefined()-
Methods inherited from class org.pkl.core.ast.member.Member
getHeaderSection, getModifiers, getName, getNameOrNull, getQualifiedName, getSourceSection, isAbstract, isClass, isConst, isConstOrFixed, isExternal, isFixed, isGlob, isHidden, isImport, isLocal, isLocalOrExternalOrAbstract, isLocalOrExternalOrHidden, isType, isTypeAlias
-
-
-
-
Constructor Detail
-
ObjectMember
public ObjectMember(com.oracle.truffle.api.source.SourceSection sourceSection, com.oracle.truffle.api.source.SourceSection headerSection, int modifiers, @Nullable Identifier name, java.lang.String qualifiedName)
-
-
Method Detail
-
initConstantValue
public void initConstantValue(ConstantNode node)
-
initConstantValue
public void initConstantValue(java.lang.Object value)
-
initMemberNode
public void initMemberNode(MemberNode node)
-
isProp
public boolean isProp()
Tells if this member is a property.Not named `isProperty()` to work around https://bugs.openjdk.java.net/browse/JDK-8185424 (which is apparently triggered by `-Xdoclint:none`).
-
isElement
public boolean isElement()
Tells if this member is an element.
-
isEntry
public boolean isEntry()
Tells if this member is an entry. Note that this returns true if an existing element is overridden with entry syntax (e.g., `[3] = ...`).
-
getConstantValue
public @Nullable java.lang.Object getConstantValue()
-
getMemberNode
public @Nullable MemberNode getMemberNode()
-
getCallTarget
public com.oracle.truffle.api.RootCallTarget getCallTarget()
-
isUndefined
public boolean isUndefined()
-
getLocalPropertyDefaultValue
public @Nullable java.lang.Object getLocalPropertyDefaultValue()
-
getCallSignature
public @Nullable java.lang.String getCallSignature()
Description copied from class:MemberFor use in user-facing messages. Non-null iff getName() is non-null.- Specified by:
getCallSignaturein classMember
-
getBodySection
public com.oracle.truffle.api.source.SourceSection getBodySection()
-
equals
public boolean equals(@Nullable java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-