org.jetbrains.kotlin.descriptors.impl
Class ClassConstructorDescriptorImpl
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.FunctionDescriptorImpl
org.jetbrains.kotlin.descriptors.impl.ClassConstructorDescriptorImpl
- All Implemented Interfaces:
- CallableDescriptor, CallableMemberDescriptor, DeclarationDescriptor, DeclarationDescriptorNonRoot, DeclarationDescriptorWithSource, DeclarationDescriptorWithVisibility, FunctionDescriptor, MemberDescriptor, Named
- Direct Known Subclasses:
- JavaClassConstructorDescriptor
public class ClassConstructorDescriptorImpl
- extends FunctionDescriptorImpl
|
Method Summary |
|
accept(DeclarationDescriptorVisitor<R,D> visitor,
D data)
|
ClassConstructorDescriptor |
copy(DeclarationDescriptor newOwner,
Modality modality,
Visibility visibility,
CallableMemberDescriptor.Kind kind,
boolean copyOverrides)
|
static ClassConstructorDescriptorImpl |
create(ClassDescriptor containingDeclaration,
Annotations annotations,
boolean isPrimary,
SourceElement source)
|
protected ClassConstructorDescriptorImpl |
createSubstitutedCopy(DeclarationDescriptor newOwner,
FunctionDescriptor original,
CallableMemberDescriptor.Kind kind,
Name newName,
Annotations annotations,
SourceElement source)
|
static ClassConstructorDescriptorImpl |
createSynthesized(ClassDescriptor containingDeclaration,
Annotations annotations,
boolean isPrimary,
SourceElement source)
|
ClassDescriptor |
getConstructedClass()
|
ClassDescriptor |
getContainingDeclaration()
|
ClassConstructorDescriptor |
getOriginal()
|
java.util.Collection<? extends FunctionDescriptor> |
getOverriddenDescriptors()
This method should be used with q Wgreat care, because if descriptor is substituted one, calling 'getOverriddenDescriptors'
may force lazy computation, that's unnecessary in most cases. |
ClassConstructorDescriptorImpl |
initialize(java.util.List<ValueParameterDescriptor> unsubstitutedValueParameters,
Visibility visibility)
|
ClassConstructorDescriptorImpl |
initialize(java.util.List<ValueParameterDescriptor> unsubstitutedValueParameters,
Visibility visibility,
java.util.List<TypeParameterDescriptor> typeParameterDescriptors)
|
boolean |
isPrimary()
|
void |
setOverriddenDescriptors(java.util.Collection<? extends CallableMemberDescriptor> overriddenDescriptors)
|
ClassConstructorDescriptor |
substitute(TypeSubstitutor originalSubstitutor)
|
| Methods inherited from class org.jetbrains.kotlin.descriptors.impl.FunctionDescriptorImpl |
doSubstitute, getDispatchReceiverParameter, getExtensionReceiverParameter, getExtensionReceiverParameterType, getInitialSignatureDescriptor, getKind, getModality, getReturnType, getSubstitutedValueParameters, getTypeParameters, getUserData, getValueParameters, getVisibility, hasStableParameterNames, hasSynthesizedParameterNames, initialize, isExternal, isHeader, isHiddenForResolutionEverywhereBesideSupercalls, isHiddenToOvercomeSignatureClash, isImpl, isInfix, isInline, isOperator, isSuspend, isTailrec, newCopyBuilder, newCopyBuilder, setExternal, setHasStableParameterNames, setHasSynthesizedParameterNames, setHeader, setHiddenToOvercomeSignatureClash, setImpl, setInfix, setInline, setOperator, setReturnType, setSuspend, setTailrec, setVisibility |
| 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.Named |
getName |
isPrimary
protected final boolean isPrimary
ClassConstructorDescriptorImpl
protected ClassConstructorDescriptorImpl(@NotNull
ClassDescriptor containingDeclaration,
@Nullable
ConstructorDescriptor original,
@NotNull
Annotations annotations,
boolean isPrimary,
@NotNull
CallableMemberDescriptor.Kind kind,
@NotNull
SourceElement source)
create
@NotNull
public static ClassConstructorDescriptorImpl create(@NotNull
ClassDescriptor containingDeclaration,
@NotNull
Annotations annotations,
boolean isPrimary,
@NotNull
SourceElement source)
createSynthesized
@NotNull
public static ClassConstructorDescriptorImpl createSynthesized(@NotNull
ClassDescriptor containingDeclaration,
@NotNull
Annotations annotations,
boolean isPrimary,
@NotNull
SourceElement source)
initialize
public ClassConstructorDescriptorImpl initialize(@NotNull
java.util.List<ValueParameterDescriptor> unsubstitutedValueParameters,
@NotNull
Visibility visibility,
@NotNull
java.util.List<TypeParameterDescriptor> typeParameterDescriptors)
initialize
public ClassConstructorDescriptorImpl initialize(@NotNull
java.util.List<ValueParameterDescriptor> unsubstitutedValueParameters,
@NotNull
Visibility visibility)
getContainingDeclaration
@NotNull
public ClassDescriptor getContainingDeclaration()
- Specified by:
getContainingDeclaration in interface DeclarationDescriptor- Specified by:
getContainingDeclaration in interface DeclarationDescriptorNonRoot- Specified by:
getContainingDeclaration in interface FunctionDescriptor- Overrides:
getContainingDeclaration in class DeclarationDescriptorNonRootImpl
getConstructedClass
@NotNull
public ClassDescriptor getConstructedClass()
getOriginal
@NotNull
public ClassConstructorDescriptor 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- Overrides:
getOriginal in class FunctionDescriptorImpl
- 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
@Nullable
public ClassConstructorDescriptor substitute(@NotNull
TypeSubstitutor originalSubstitutor)
- Specified by:
substitute in interface CallableDescriptor- Specified by:
substitute in interface DeclarationDescriptor- Specified by:
substitute in interface FunctionDescriptor- Overrides:
substitute in class FunctionDescriptorImpl
accept
public <R,D> R accept(DeclarationDescriptorVisitor<R,D> visitor,
D data)
- Specified by:
accept in interface DeclarationDescriptor- Overrides:
accept in class FunctionDescriptorImpl
isPrimary
public boolean isPrimary()
getOverriddenDescriptors
@NotNull
public java.util.Collection<? extends FunctionDescriptor> getOverriddenDescriptors()
- Description copied from interface:
FunctionDescriptor
- This method should be used with q Wgreat care, because if descriptor is substituted one, calling 'getOverriddenDescriptors'
may force lazy computation, that's unnecessary in most cases.
So, if 'getOriginal().getOverriddenDescriptors()' is enough for you, please use it instead.
- Specified by:
getOverriddenDescriptors in interface CallableDescriptor- Specified by:
getOverriddenDescriptors in interface CallableMemberDescriptor- Specified by:
getOverriddenDescriptors in interface FunctionDescriptor- Overrides:
getOverriddenDescriptors in class FunctionDescriptorImpl
setOverriddenDescriptors
public void setOverriddenDescriptors(@NotNull
java.util.Collection<? extends CallableMemberDescriptor> overriddenDescriptors)
- Specified by:
setOverriddenDescriptors in interface CallableMemberDescriptor- Overrides:
setOverriddenDescriptors in class FunctionDescriptorImpl
createSubstitutedCopy
@NotNull
protected ClassConstructorDescriptorImpl createSubstitutedCopy(@NotNull
DeclarationDescriptor newOwner,
@Nullable
FunctionDescriptor original,
@NotNull
CallableMemberDescriptor.Kind kind,
@Nullable
Name newName,
@NotNull
Annotations annotations,
@NotNull
SourceElement source)
- Specified by:
createSubstitutedCopy in class FunctionDescriptorImpl
copy
@NotNull
public ClassConstructorDescriptor copy(DeclarationDescriptor newOwner,
Modality modality,
Visibility visibility,
CallableMemberDescriptor.Kind kind,
boolean copyOverrides)
- Specified by:
copy in interface CallableMemberDescriptor- Specified by:
copy in interface FunctionDescriptor- Overrides:
copy in class FunctionDescriptorImpl