org.jetbrains.kotlin.descriptors.impl
Class PropertyAccessorDescriptorImpl

java.lang.Object
  extended by org.jetbrains.kotlin.descriptors.annotations.AnnotatedImpl
      extended by org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorImpl
          extended by org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorNonRootImpl
              extended by 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


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jetbrains.kotlin.descriptors.CallableMemberDescriptor
CallableMemberDescriptor.Kind
 
Constructor Summary
PropertyAccessorDescriptorImpl(Modality modality, Visibility visibility, PropertyDescriptor correspondingProperty, Annotations annotations, Name name, boolean hasBody, boolean isDefault, boolean isExternal, CallableMemberDescriptor.Kind kind, SourceElement source)
           
 
Method Summary
 void addOverriddenDescriptor(CallableMemberDescriptor overridden)
           
 PropertyAccessorDescriptor copy(DeclarationDescriptor newOwner, Modality modality, Visibility visibility, CallableMemberDescriptor.Kind kind, boolean copyOverrides)
           
 PropertyDescriptor getCorrespondingProperty()
           
 ReceiverParameterDescriptor getDispatchReceiverParameter()
           
 ReceiverParameterDescriptor getExtensionReceiverParameter()
           
 FunctionDescriptor getInitialSignatureDescriptor()
           
 CallableMemberDescriptor.Kind getKind()
          Is this a real function or function projection.
 Modality getModality()
           
abstract  PropertyAccessorDescriptor getOriginal()
           
protected  java.util.Collection<PropertyAccessorDescriptor> getOverriddenDescriptors(boolean isGetter)
           
 java.util.List<TypeParameterDescriptor> getTypeParameters()
           
 Visibility getVisibility()
           
 boolean hasBody()
           
 boolean hasStableParameterNames()
          Kotlin functions always have stable parameter names that can be reliably used when calling them with named arguments.
 boolean hasSynthesizedParameterNames()
          Sometimes parameter names are not available at all (e.g.
 boolean isDefault()
           
 boolean isExternal()
           
 boolean isHiddenToOvercomeSignatureClash()
           
 boolean isInfix()
           
 boolean isInline()
           
 boolean isOperator()
           
 boolean isTailrec()
           
 void setInitialSignatureDescriptor(FunctionDescriptor initialSignatureDescriptor)
           
 void setVisibility(Visibility visibility)
           
 FunctionDescriptor substitute(TypeSubstitutor substitutor)
           
 
Methods inherited from class org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorNonRootImpl
getContainingDeclaration, getSource
 
Methods inherited from class org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorImpl
acceptVoid, getName, toString, toString
 
Methods inherited from class org.jetbrains.kotlin.descriptors.annotations.AnnotatedImpl
getAnnotations
 
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.PropertyAccessorDescriptor
getOverriddenDescriptors
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.FunctionDescriptor
getContainingDeclaration
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.CallableDescriptor
getReturnType, getValueParameters
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.DeclarationDescriptorWithSource
getSource
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.DeclarationDescriptor
accept, acceptVoid
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.annotations.Annotated
getAnnotations
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.Named
getName
 

Constructor Detail

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)
Method Detail

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