org.jetbrains.kotlin.descriptors
Interface ValueParameterDescriptor

All Superinterfaces:
Annotated, CallableDescriptor, DeclarationDescriptor, DeclarationDescriptorNonRoot, DeclarationDescriptorWithSource, DeclarationDescriptorWithVisibility, Named, ParameterDescriptor, VariableDescriptor
All Known Implementing Classes:
ValueParameterDescriptorImpl

public interface ValueParameterDescriptor
extends VariableDescriptor, ParameterDescriptor


Method Summary
 ValueParameterDescriptor copy(CallableDescriptor newOwner, Name newName)
           
 boolean declaresDefaultValue()
           
 CallableDescriptor getContainingDeclaration()
           
 int getIndex()
          Returns the 0-based index of the value parameter in the parameter list of its containing function.
 ValueParameterDescriptor getOriginal()
           
 java.util.Collection<? extends ValueParameterDescriptor> getOverriddenDescriptors()
          Parameter p1 overrides p2 iff a) their respective owners (function declarations) f1 override f2 b) p1 and p2 have the same indices in the owners' parameter lists
 JetType getVarargElementType()
           
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.VariableDescriptor
getCompileTimeInitializer, getType, isConst, isVar, substitute
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.ParameterDescriptor
getType
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.CallableDescriptor
getDispatchReceiverParameter, getExtensionReceiverParameter, getReturnType, getTypeParameters, getValueParameters, hasStableParameterNames, hasSynthesizedParameterNames
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.DeclarationDescriptorWithVisibility
getVisibility
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.DeclarationDescriptorWithSource
getSource
 

Method Detail

getContainingDeclaration

@NotNull
CallableDescriptor getContainingDeclaration()
Specified by:
getContainingDeclaration in interface DeclarationDescriptor
Specified by:
getContainingDeclaration in interface DeclarationDescriptorNonRoot
Specified by:
getContainingDeclaration in interface ParameterDescriptor
Specified by:
getContainingDeclaration in interface VariableDescriptor

getIndex

int getIndex()
Returns the 0-based index of the value parameter in the parameter list of its containing function.

Returns:
the parameter index

declaresDefaultValue

boolean declaresDefaultValue()
Returns:
true iff this parameter belongs to a declared function (not a fake override) and declares the default value, i.e. explicitly specifies it in the function signature. Also see 'hasDefaultValue' extension in DescriptorUtils.kt

getVarargElementType

@Nullable
JetType getVarargElementType()

getOriginal

@NotNull
ValueParameterDescriptor getOriginal()
Specified by:
getOriginal in interface CallableDescriptor
Specified by:
getOriginal in interface DeclarationDescriptor
Specified by:
getOriginal in interface DeclarationDescriptorWithSource
Specified by:
getOriginal in interface ParameterDescriptor
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

copy

@NotNull
ValueParameterDescriptor copy(@NotNull
                                      CallableDescriptor newOwner,
                                      @NotNull
                                      Name newName)

getOverriddenDescriptors

@NotNull
java.util.Collection<? extends ValueParameterDescriptor> getOverriddenDescriptors()
Parameter p1 overrides p2 iff a) their respective owners (function declarations) f1 override f2 b) p1 and p2 have the same indices in the owners' parameter lists

Specified by:
getOverriddenDescriptors in interface CallableDescriptor