org.jetbrains.kotlin.descriptors.impl
Class PropertyAccessorDescriptorImpl
java.lang.Object
org.jetbrains.kotlin.descriptors.annotations.AnnotatedImpl
org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorImpl
org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorNonRootImpl
org.jetbrains.kotlin.descriptors.impl.PropertyAccessorDescriptorImpl
- All Implemented Interfaces:
- Annotated, CallableDescriptor, CallableMemberDescriptor, DeclarationDescriptor, DeclarationDescriptorNonRoot, DeclarationDescriptorWithSource, DeclarationDescriptorWithVisibility, FunctionDescriptor, MemberDescriptor, Named, PropertyAccessorDescriptor
- Direct Known Subclasses:
- PropertyGetterDescriptorImpl, PropertySetterDescriptorImpl
public abstract class PropertyAccessorDescriptorImpl
- extends DeclarationDescriptorNonRootImpl
- implements PropertyAccessorDescriptor
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jetbrains.kotlin.descriptors.Named |
getName |
PropertyAccessorDescriptorImpl
public PropertyAccessorDescriptorImpl(@NotNull
Modality modality,
@NotNull
Visibility visibility,
@NotNull
PropertyDescriptor correspondingProperty,
@NotNull
Annotations annotations,
@NotNull
Name name,
boolean hasBody,
boolean isDefault,
boolean isExternal,
CallableMemberDescriptor.Kind kind,
@NotNull
SourceElement source)
hasBody
public boolean hasBody()
- Specified by:
hasBody in interface PropertyAccessorDescriptor
isDefault
public boolean isDefault()
- Specified by:
isDefault in interface PropertyAccessorDescriptor
getKind
@NotNull
public CallableMemberDescriptor.Kind getKind()
- Description copied from interface:
CallableMemberDescriptor
- Is this a real function or function projection.
- Specified by:
getKind in interface CallableMemberDescriptor
isOperator
public boolean isOperator()
- Specified by:
isOperator in interface FunctionDescriptor
isInfix
public boolean isInfix()
- Specified by:
isInfix in interface FunctionDescriptor
isExternal
public boolean isExternal()
- Specified by:
isExternal in interface FunctionDescriptor- Specified by:
isExternal in interface PropertyAccessorDescriptor
isInline
public boolean isInline()
- Specified by:
isInline in interface FunctionDescriptor
isTailrec
public boolean isTailrec()
- Specified by:
isTailrec in interface FunctionDescriptor
substitute
@NotNull
public FunctionDescriptor substitute(@NotNull
TypeSubstitutor substitutor)
- Specified by:
substitute in interface CallableDescriptor- Specified by:
substitute in interface DeclarationDescriptor- Specified by:
substitute in interface FunctionDescriptor
getTypeParameters
@NotNull
public java.util.List<TypeParameterDescriptor> getTypeParameters()
- Specified by:
getTypeParameters in interface CallableDescriptor
hasStableParameterNames
public boolean hasStableParameterNames()
- Description copied from interface:
CallableDescriptor
- Kotlin functions always have stable parameter names that can be reliably used when calling them with named arguments.
Functions loaded from platform definitions (e.g. Java binaries or JS) may have unstable parameter names that vary from
one platform installation to another. These names can not be used reliably for calls with named arguments.
- Specified by:
hasStableParameterNames in interface CallableDescriptor
hasSynthesizedParameterNames
public boolean hasSynthesizedParameterNames()
- Description copied from interface:
CallableDescriptor
- Sometimes parameter names are not available at all (e.g. Java binaries with not enough debug information).
In this case, getName() returns synthetic names such as "p0", "p1" etc.
- Specified by:
hasSynthesizedParameterNames in interface CallableDescriptor
getModality
@NotNull
public Modality getModality()
- Specified by:
getModality in interface MemberDescriptor
getVisibility
@NotNull
public Visibility getVisibility()
- Specified by:
getVisibility in interface DeclarationDescriptorWithVisibility- Specified by:
getVisibility in interface MemberDescriptor
setVisibility
public void setVisibility(Visibility visibility)
getCorrespondingProperty
@NotNull
public PropertyDescriptor getCorrespondingProperty()
- Specified by:
getCorrespondingProperty in interface PropertyAccessorDescriptor
getExtensionReceiverParameter
@Nullable
public ReceiverParameterDescriptor getExtensionReceiverParameter()
- Specified by:
getExtensionReceiverParameter in interface CallableDescriptor
getDispatchReceiverParameter
@Nullable
public ReceiverParameterDescriptor getDispatchReceiverParameter()
- Specified by:
getDispatchReceiverParameter in interface CallableDescriptor
copy
@NotNull
public PropertyAccessorDescriptor copy(DeclarationDescriptor newOwner,
Modality modality,
Visibility visibility,
CallableMemberDescriptor.Kind kind,
boolean copyOverrides)
- Specified by:
copy in interface CallableMemberDescriptor- Specified by:
copy in interface FunctionDescriptor- Specified by:
copy in interface PropertyAccessorDescriptor
getOverriddenDescriptors
@NotNull
protected java.util.Collection<PropertyAccessorDescriptor> getOverriddenDescriptors(boolean isGetter)
addOverriddenDescriptor
public void addOverriddenDescriptor(@NotNull
CallableMemberDescriptor overridden)
- Specified by:
addOverriddenDescriptor in interface CallableMemberDescriptor
getOriginal
@NotNull
public abstract PropertyAccessorDescriptor getOriginal()
- Specified by:
getOriginal in interface CallableDescriptor- Specified by:
getOriginal in interface CallableMemberDescriptor- Specified by:
getOriginal in interface DeclarationDescriptor- Specified by:
getOriginal in interface DeclarationDescriptorWithSource- Specified by:
getOriginal in interface FunctionDescriptor- Specified by:
getOriginal in interface PropertyAccessorDescriptor- Overrides:
getOriginal in class DeclarationDescriptorNonRootImpl
- Returns:
- The descriptor that corresponds to the original declaration of this element.
A descriptor can be obtained from its original by substituting type arguments (of the declaring class
or of the element itself).
returns
this object if the current descriptor is original itself
getInitialSignatureDescriptor
@Nullable
public FunctionDescriptor getInitialSignatureDescriptor()
- Specified by:
getInitialSignatureDescriptor in interface FunctionDescriptor
- Returns:
- descriptor that represents initial signature, e.g in case of result SimpleFunctionDescriptor.createRenamedCopy it returns
descriptor before rename
setInitialSignatureDescriptor
public void setInitialSignatureDescriptor(@Nullable
FunctionDescriptor initialSignatureDescriptor)
isHiddenToOvercomeSignatureClash
public boolean isHiddenToOvercomeSignatureClash()
- Specified by:
isHiddenToOvercomeSignatureClash in interface FunctionDescriptor
- Returns:
- true if descriptor signature clashed with some other signature and it's supposed to be legal
See java.nio.CharBuffer