org.jetbrains.kotlin.descriptors.impl
Class ValueParameterDescriptorImpl
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.VariableDescriptorImpl
org.jetbrains.kotlin.descriptors.impl.ValueParameterDescriptorImpl
- All Implemented Interfaces:
- Annotated, CallableDescriptor, DeclarationDescriptor, DeclarationDescriptorNonRoot, DeclarationDescriptorWithSource, DeclarationDescriptorWithVisibility, Named, ParameterDescriptor, ValueParameterDescriptor, VariableDescriptor
public class ValueParameterDescriptorImpl
- extends VariableDescriptorImpl
- implements ValueParameterDescriptor
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ValueParameterDescriptorImpl
public ValueParameterDescriptorImpl(@NotNull
CallableDescriptor containingDeclaration,
@Nullable
ValueParameterDescriptor original,
int index,
@NotNull
Annotations annotations,
@NotNull
Name name,
@NotNull
JetType outType,
boolean declaresDefaultValue,
@Nullable
JetType varargElementType,
@NotNull
SourceElement source)
getContainingDeclaration
@NotNull
public 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 ValueParameterDescriptor- Specified by:
getContainingDeclaration in interface VariableDescriptor- Overrides:
getContainingDeclaration in class DeclarationDescriptorNonRootImpl
getIndex
public int getIndex()
- Description copied from interface:
ValueParameterDescriptor
- Returns the 0-based index of the value parameter in the parameter list of its containing function.
- Specified by:
getIndex in interface ValueParameterDescriptor
- Returns:
- the parameter index
declaresDefaultValue
public boolean declaresDefaultValue()
- Specified by:
declaresDefaultValue in interface ValueParameterDescriptor
- 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
public JetType getVarargElementType()
- Specified by:
getVarargElementType in interface ValueParameterDescriptor
getOriginal
@NotNull
public 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- Specified by:
getOriginal in interface ValueParameterDescriptor- Overrides:
getOriginal in class VariableDescriptorImpl
- 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
substitute
@NotNull
public ValueParameterDescriptor substitute(@NotNull
TypeSubstitutor substitutor)
- Specified by:
substitute in interface CallableDescriptor- Specified by:
substitute in interface DeclarationDescriptor- Specified by:
substitute in interface VariableDescriptor
accept
public <R,D> R accept(DeclarationDescriptorVisitor<R,D> visitor,
D data)
- Specified by:
accept in interface DeclarationDescriptor
isVar
public boolean isVar()
- Specified by:
isVar in interface VariableDescriptor
getCompileTimeInitializer
@Nullable
public getCompileTimeInitializer()
- Specified by:
getCompileTimeInitializer in interface VariableDescriptor
copy
@NotNull
public ValueParameterDescriptor copy(@NotNull
CallableDescriptor newOwner,
@NotNull
Name newName)
- Specified by:
copy in interface ValueParameterDescriptor
getVisibility
@NotNull
public Visibility getVisibility()
- Specified by:
getVisibility in interface DeclarationDescriptorWithVisibility
getOverriddenDescriptors
@NotNull
public java.util.Collection<? extends ValueParameterDescriptor> getOverriddenDescriptors()
- Description copied from interface:
ValueParameterDescriptor
- 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- Specified by:
getOverriddenDescriptors in interface ValueParameterDescriptor- Overrides:
getOverriddenDescriptors in class VariableDescriptorImpl