org.jetbrains.kotlin.load.java.descriptors
Class JavaPropertyDescriptor

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.VariableDescriptorImpl
                  extended by org.jetbrains.kotlin.descriptors.impl.VariableDescriptorWithInitializerImpl
                      extended by org.jetbrains.kotlin.descriptors.impl.PropertyDescriptorImpl
                          extended by org.jetbrains.kotlin.load.java.descriptors.JavaPropertyDescriptor
All Implemented Interfaces:
Annotated, CallableDescriptor, CallableMemberDescriptor, DeclarationDescriptor, DeclarationDescriptorNonRoot, DeclarationDescriptorWithSource, DeclarationDescriptorWithVisibility, MemberDescriptor, Named, PropertyDescriptor, VariableDescriptor, JavaCallableMemberDescriptor

public class JavaPropertyDescriptor
extends PropertyDescriptorImpl
implements JavaCallableMemberDescriptor


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jetbrains.kotlin.descriptors.CallableMemberDescriptor
CallableMemberDescriptor.Kind
 
Field Summary
 
Fields inherited from class org.jetbrains.kotlin.descriptors.impl.VariableDescriptorWithInitializerImpl
compileTimeInitializer
 
Fields inherited from class org.jetbrains.kotlin.descriptors.impl.VariableDescriptorImpl
outType
 
Constructor Summary
protected JavaPropertyDescriptor(DeclarationDescriptor containingDeclaration, Annotations annotations, Modality modality, Visibility visibility, boolean isVar, Name name, SourceElement source, PropertyDescriptor original, CallableMemberDescriptor.Kind kind, boolean isStaticFinal)
           
 
Method Summary
static JavaPropertyDescriptor create(DeclarationDescriptor containingDeclaration, Annotations annotations, Modality modality, Visibility visibility, boolean isVar, Name name, SourceElement source, boolean isStaticFinal)
           
protected  PropertyDescriptorImpl createSubstitutedCopy(DeclarationDescriptor newOwner, Modality newModality, Visibility newVisibility, PropertyDescriptor original, CallableMemberDescriptor.Kind kind)
           
 JavaCallableMemberDescriptor enhance(KotlinType enhancedReceiverType, java.util.List<KotlinType> enhancedValueParametersTypes, KotlinType enhancedReturnType)
           
 boolean hasSynthesizedParameterNames()
          Sometimes parameter names are not available at all (e.g.
 boolean isConst()
           
 
Methods inherited from class org.jetbrains.kotlin.descriptors.impl.PropertyDescriptorImpl
accept, copy, create, doSubstitute, getAccessors, getDispatchReceiverParameter, getExtensionReceiverParameter, getGetter, getKind, getModality, getOriginal, getOverriddenDescriptors, getReturnType, getSetter, getTypeParameters, getVisibility, initialize, isLateInit, isSetterProjectedOut, setOverriddenDescriptors, setSetterProjectedOut, setType, setType, setVisibility, substitute
 
Methods inherited from class org.jetbrains.kotlin.descriptors.impl.VariableDescriptorWithInitializerImpl
getCompileTimeInitializer, isVar, setCompileTimeInitializer
 
Methods inherited from class org.jetbrains.kotlin.descriptors.impl.VariableDescriptorImpl
getType, getValueParameters, hasStableParameterNames, setOutType
 
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.CallableMemberDescriptor
copy, getKind, getOriginal, getOverriddenDescriptors, setOverriddenDescriptors
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.CallableDescriptor
getDispatchReceiverParameter, getExtensionReceiverParameter, getReturnType, getTypeParameters, getValueParameters, hasStableParameterNames, substitute
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.MemberDescriptor
getModality, getVisibility
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.DeclarationDescriptorNonRoot
getContainingDeclaration
 
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
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.VariableDescriptor
getCompileTimeInitializer, getContainingDeclaration, getType, isVar
 

Constructor Detail

JavaPropertyDescriptor

protected JavaPropertyDescriptor(@NotNull
                                 DeclarationDescriptor containingDeclaration,
                                 @NotNull
                                 Annotations annotations,
                                 @NotNull
                                 Modality modality,
                                 @NotNull
                                 Visibility visibility,
                                 boolean isVar,
                                 @NotNull
                                 Name name,
                                 @NotNull
                                 SourceElement source,
                                 @Nullable
                                 PropertyDescriptor original,
                                 @NotNull
                                 CallableMemberDescriptor.Kind kind,
                                 boolean isStaticFinal)
Method Detail

create

@NotNull
public static JavaPropertyDescriptor create(@NotNull
                                                    DeclarationDescriptor containingDeclaration,
                                                    @NotNull
                                                    Annotations annotations,
                                                    @NotNull
                                                    Modality modality,
                                                    @NotNull
                                                    Visibility visibility,
                                                    boolean isVar,
                                                    @NotNull
                                                    Name name,
                                                    @NotNull
                                                    SourceElement source,
                                                    boolean isStaticFinal)

createSubstitutedCopy

@NotNull
protected PropertyDescriptorImpl createSubstitutedCopy(@NotNull
                                                               DeclarationDescriptor newOwner,
                                                               @NotNull
                                                               Modality newModality,
                                                               @NotNull
                                                               Visibility newVisibility,
                                                               @Nullable
                                                               PropertyDescriptor original,
                                                               @NotNull
                                                               CallableMemberDescriptor.Kind kind)
Overrides:
createSubstitutedCopy in class PropertyDescriptorImpl

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
Overrides:
hasSynthesizedParameterNames in class VariableDescriptorImpl

enhance

@NotNull
public JavaCallableMemberDescriptor enhance(@Nullable
                                                    KotlinType enhancedReceiverType,
                                                    @NotNull
                                                    java.util.List<KotlinType> enhancedValueParametersTypes,
                                                    @NotNull
                                                    KotlinType enhancedReturnType)
Specified by:
enhance in interface JavaCallableMemberDescriptor

isConst

public boolean isConst()
Specified by:
isConst in interface VariableDescriptor
Overrides:
isConst in class PropertyDescriptorImpl
Returns:
true if iff original declaration has appropriate flags and type, e.g. `const` modifier in Kotlin. It completely does not means that if isConst then `getCompileTimeInitializer` is not null