org.jetbrains.kotlin.descriptors
Interface ValueParameterDescriptor
- All Superinterfaces:
- Annotated, CallableDescriptor, DeclarationDescriptor, DeclarationDescriptorNonRoot, DeclarationDescriptorWithSource, DeclarationDescriptorWithVisibility, Named, VariableDescriptor
- All Known Implementing Classes:
- ValueParameterDescriptorImpl
public interface ValueParameterDescriptor
- extends VariableDescriptor
Methods inherited from interface org.jetbrains.kotlin.descriptors.Named |
getName |
getIndex
int getIndex()
- Returns the 0-based index of the value parameter in the parameter list of its containing function.
- Returns:
- the parameter index
hasDefaultValue
boolean hasDefaultValue()
- The front-end relies on this property when resolving function calls
- Returns:
true
iff the parameter has a default value, i.e. declares it or inherits
by overriding a parameter in an overridden function.
declaresDefaultValue
boolean declaresDefaultValue()
- The back-end should relies on this property when generating function signatures
- Returns:
true
iff the parameter declares a default value, i.e. explicitly specifies it in the function header
getVarargElementType
@Nullable
JetType getVarargElementType()
getType
@NotNull
JetType getType()
- Specified by:
getType
in interface VariableDescriptor
getOriginal
@NotNull
ValueParameterDescriptor getOriginal()
- Specified by:
getOriginal
in interface CallableDescriptor
- Specified by:
getOriginal
in interface DeclarationDescriptor
- 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
DeclarationDescriptor newOwner,
@NotNull
Name newName)
getOverriddenDescriptors
@NotNull
java.util.Set<? 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
addOverriddenDescriptor
void addOverriddenDescriptor(@NotNull
ValueParameterDescriptor overridden)