org.jetbrains.kotlin.load.java.descriptors
Class JavaConstructorDescriptor
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.ConstructorDescriptorImpl
org.jetbrains.kotlin.load.java.descriptors.JavaConstructorDescriptor
- All Implemented Interfaces:
- Annotated, CallableDescriptor, CallableMemberDescriptor, ConstructorDescriptor, DeclarationDescriptor, DeclarationDescriptorNonRoot, DeclarationDescriptorWithSource, DeclarationDescriptorWithVisibility, FunctionDescriptor, MemberDescriptor, Named, JavaCallableMemberDescriptor
public class JavaConstructorDescriptor
- extends ConstructorDescriptorImpl
- implements JavaCallableMemberDescriptor
|
Method Summary |
protected JavaConstructorDescriptor |
createDescriptor(ClassDescriptor newOwner,
JavaConstructorDescriptor original,
CallableMemberDescriptor.Kind kind,
SourceElement sourceElement)
|
static JavaConstructorDescriptor |
createJavaConstructor(ClassDescriptor containingDeclaration,
Annotations annotations,
boolean isPrimary,
SourceElement source)
|
protected JavaConstructorDescriptor |
createSubstitutedCopy(DeclarationDescriptor newOwner,
FunctionDescriptor original,
CallableMemberDescriptor.Kind kind,
Name newName,
boolean preserveSource)
|
JavaConstructorDescriptor |
enhance(KotlinType enhancedReceiverType,
java.util.List<KotlinType> enhancedValueParametersTypes,
KotlinType enhancedReturnType)
|
boolean |
hasStableParameterNames()
Kotlin functions always have stable parameter names that can be reliably used when calling them with named arguments. |
boolean |
hasSynthesizedParameterNames()
Sometimes parameter names are not available at all (e.g. |
void |
setHasStableParameterNames(boolean hasStableParameterNames)
|
void |
setHasSynthesizedParameterNames(boolean hasSynthesizedParameterNames)
|
| Methods inherited from class org.jetbrains.kotlin.descriptors.impl.ConstructorDescriptorImpl |
accept, copy, create, getContainingDeclaration, getOriginal, getOverriddenDescriptors, initialize, initialize, isPrimary, setOverriddenDescriptors, substitute |
| Methods inherited from class org.jetbrains.kotlin.descriptors.impl.FunctionDescriptorImpl |
doSubstitute, getDispatchReceiverParameter, getExtensionReceiverParameter, getExtensionReceiverParameterType, getInitialSignatureDescriptor, getKind, getModality, getReturnType, getSourceToUseForCopy, getSubstitutedValueParameters, getTypeParameters, getValueParameters, getVisibility, initialize, isExternal, isHiddenToOvercomeSignatureClash, isInfix, isInline, isOperator, isTailrec, newCopyBuilder, setExternal, setHidden, setInfix, setInitialSignatureDescriptor, setInline, setOperator, setReturnType, 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 |
JavaConstructorDescriptor
protected JavaConstructorDescriptor(@NotNull
ClassDescriptor containingDeclaration,
@Nullable
JavaConstructorDescriptor original,
@NotNull
Annotations annotations,
boolean isPrimary,
@NotNull
CallableMemberDescriptor.Kind kind,
@NotNull
SourceElement source)
createJavaConstructor
@NotNull
public static JavaConstructorDescriptor createJavaConstructor(@NotNull
ClassDescriptor containingDeclaration,
@NotNull
Annotations annotations,
boolean isPrimary,
@NotNull
SourceElement source)
hasStableParameterNames
public boolean hasStableParameterNames()
- Description copied from interface:
CallableDescriptor
- Kotlin functions always have stable parameter names that can be reliably used when calling them with named arguments.
Functions loaded from platform definitions (e.g. Java binaries or JS) may have unstable parameter names that vary from
one platform installation to another. These names can not be used reliably for calls with named arguments.
- Specified by:
hasStableParameterNames in interface CallableDescriptor- Overrides:
hasStableParameterNames in class FunctionDescriptorImpl
setHasStableParameterNames
public void setHasStableParameterNames(boolean hasStableParameterNames)
- Overrides:
setHasStableParameterNames in class FunctionDescriptorImpl
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 FunctionDescriptorImpl
setHasSynthesizedParameterNames
public void setHasSynthesizedParameterNames(boolean hasSynthesizedParameterNames)
- Overrides:
setHasSynthesizedParameterNames in class FunctionDescriptorImpl
createSubstitutedCopy
@NotNull
protected JavaConstructorDescriptor createSubstitutedCopy(@NotNull
DeclarationDescriptor newOwner,
@Nullable
FunctionDescriptor original,
@NotNull
CallableMemberDescriptor.Kind kind,
@Nullable
Name newName,
boolean preserveSource)
- Overrides:
createSubstitutedCopy in class ConstructorDescriptorImpl
createDescriptor
@NotNull
protected JavaConstructorDescriptor createDescriptor(@NotNull
ClassDescriptor newOwner,
@Nullable
JavaConstructorDescriptor original,
@NotNull
CallableMemberDescriptor.Kind kind,
@NotNull
SourceElement sourceElement)
enhance
@NotNull
public JavaConstructorDescriptor enhance(@Nullable
KotlinType enhancedReceiverType,
@NotNull
java.util.List<KotlinType> enhancedValueParametersTypes,
@NotNull
KotlinType enhancedReturnType)
- Specified by:
enhance in interface JavaCallableMemberDescriptor