kotlin.reflect.jvm.internal.impl.types.error.ErrorSimpleFunctionDescriptorImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-reflect Show documentation
Show all versions of kotlin-reflect Show documentation
Kotlin Full Reflection Library
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package kotlin.reflect.jvm.internal.impl.types.error;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import kotlin.reflect.jvm.internal.impl.descriptors.*;
import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.FunctionDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.descriptors.impl.SimpleFunctionDescriptorImpl;
import kotlin.reflect.jvm.internal.impl.name.Name;
import kotlin.reflect.jvm.internal.impl.types.ErrorUtils;
import kotlin.reflect.jvm.internal.impl.types.KotlinType;
import kotlin.reflect.jvm.internal.impl.types.TypeSubstitution;
import java.util.Collection;
import java.util.List;
public class ErrorSimpleFunctionDescriptorImpl extends SimpleFunctionDescriptorImpl {
// used for diagnostic only
@SuppressWarnings({"UnusedDeclaration", "FieldCanBeLocal"})
private final ErrorUtils.ErrorScope ownerScope;
public ErrorSimpleFunctionDescriptorImpl(@NotNull ClassDescriptor containingDeclaration, @NotNull ErrorUtils.ErrorScope ownerScope) {
super(containingDeclaration, null, Annotations.Companion.getEMPTY(), Name.special(""), Kind.DECLARATION, SourceElement.NO_SOURCE);
this.ownerScope = ownerScope;
}
@NotNull
@Override
protected FunctionDescriptorImpl createSubstitutedCopy(
@NotNull DeclarationDescriptor newOwner,
@Nullable FunctionDescriptor original,
@NotNull Kind kind,
@Nullable Name newName,
@NotNull Annotations annotations,
@NotNull SourceElement source
) {
return this;
}
@NotNull
@Override
public SimpleFunctionDescriptor copy(DeclarationDescriptor newOwner, Modality modality, DescriptorVisibility visibility, Kind kind, boolean copyOverrides) {
return this;
}
@NotNull
@Override
public CopyBuilder newCopyBuilder() {
return new CopyBuilder() {
@NotNull
@Override
public CopyBuilder setOwner(@NotNull DeclarationDescriptor owner) {
return this;
}
@NotNull
@Override
public CopyBuilder setModality(@NotNull Modality modality) {
return this;
}
@NotNull
@Override
public CopyBuilder setVisibility(@NotNull DescriptorVisibility visibility) {
return this;
}
@NotNull
@Override
public CopyBuilder setKind(@NotNull Kind kind) {
return this;
}
@NotNull
@Override
public CopyBuilder setCopyOverrides(boolean copyOverrides) {
return this;
}
@NotNull
@Override
public CopyBuilder setName(@NotNull Name name) {
return this;
}
@NotNull
@Override
public CopyBuilder setValueParameters(@NotNull List parameters) {
return this;
}
@NotNull
@Override
public CopyBuilder setSubstitution(@NotNull TypeSubstitution substitution) {
return this;
}
@NotNull
@Override
public CopyBuilder putUserData(
@NotNull UserDataKey userDataKey,
V value
) {
return this;
}
@NotNull
@Override
public CopyBuilder setTypeParameters(@NotNull List parameters) {
return this;
}
@NotNull
@Override
public CopyBuilder setReturnType(@NotNull KotlinType type) {
return this;
}
@NotNull
@Override
public CopyBuilder setExtensionReceiverParameter(@Nullable ReceiverParameterDescriptor extensionReceiverParameter) {
return this;
}
@NotNull
@Override
public CopyBuilder setDispatchReceiverParameter(@Nullable ReceiverParameterDescriptor dispatchReceiverParameter) {
return this;
}
@NotNull
@Override
public CopyBuilder setOriginal(@Nullable CallableMemberDescriptor original) {
return this;
}
@NotNull
@Override
public CopyBuilder setSignatureChange() {
return this;
}
@NotNull
@Override
public CopyBuilder setPreserveSourceElement() {
return this;
}
@NotNull
@Override
public CopyBuilder setDropOriginalInContainingParts() {
return this;
}
@NotNull
@Override
public CopyBuilder setHiddenToOvercomeSignatureClash() {
return this;
}
@NotNull
@Override
public CopyBuilder setHiddenForResolutionEverywhereBesideSupercalls() {
return this;
}
@NotNull
@Override
public CopyBuilder setAdditionalAnnotations(@NotNull Annotations additionalAnnotations) {
return this;
}
@Nullable
@Override
public SimpleFunctionDescriptor build() {
return ErrorSimpleFunctionDescriptorImpl.this;
}
};
}
@Override
public boolean isSuspend() {
return false;
}
@Override
public V getUserData(UserDataKey key) {
return null;
}
@Override
public void setOverriddenDescriptors(@NotNull Collection overriddenDescriptors) {
// nop
}
}