Renamed Name.getName() and FqName.getFqName() to asString()
This commit is contained in:
+1
-1
@@ -140,7 +140,7 @@ public final class DescriptorResolverUtils {
|
||||
public static FqNameUnsafe getFqNameForClassObject(@NotNull PsiClass psiClass) {
|
||||
String psiClassQualifiedName = psiClass.getQualifiedName();
|
||||
assert psiClassQualifiedName != null : "Reading java class with no qualified name";
|
||||
return new FqNameUnsafe(psiClassQualifiedName + "." + getClassObjectName(psiClass.getName()).getName());
|
||||
return new FqNameUnsafe(psiClassQualifiedName + "." + getClassObjectName(psiClass.getName()).asString());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
+2
-2
@@ -65,7 +65,7 @@ public class JavaToKotlinClassMap extends JavaToKotlinClassMapBuilder implements
|
||||
PrimitiveType primitiveType = jvmPrimitiveType.getPrimitiveType();
|
||||
primitiveTypesMap.put(jvmPrimitiveType.getName(), KotlinBuiltIns.getInstance().getPrimitiveJetType(primitiveType));
|
||||
primitiveTypesMap.put("[" + jvmPrimitiveType.getName(), KotlinBuiltIns.getInstance().getPrimitiveArrayJetType(primitiveType));
|
||||
primitiveTypesMap.put(jvmPrimitiveType.getWrapper().getFqName().getFqName(), KotlinBuiltIns.getInstance().getNullablePrimitiveJetType(
|
||||
primitiveTypesMap.put(jvmPrimitiveType.getWrapper().getFqName().asString(), KotlinBuiltIns.getInstance().getNullablePrimitiveJetType(
|
||||
primitiveType));
|
||||
}
|
||||
primitiveTypesMap.put("void", KotlinBuiltIns.getInstance().getUnitType());
|
||||
@@ -91,7 +91,7 @@ public class JavaToKotlinClassMap extends JavaToKotlinClassMapBuilder implements
|
||||
@Nullable
|
||||
public AnnotationDescriptor mapToAnnotationClass(@NotNull FqName fqName) {
|
||||
ClassDescriptor classDescriptor = classDescriptorMap.get(fqName);
|
||||
if (classDescriptor != null && fqName.getFqName().equals(CommonClassNames.JAVA_LANG_DEPRECATED)) {
|
||||
if (classDescriptor != null && fqName.asString().equals(CommonClassNames.JAVA_LANG_DEPRECATED)) {
|
||||
return DescriptorResolverUtils.getAnnotationDescriptorForJavaLangDeprecated(classDescriptor);
|
||||
}
|
||||
return null;
|
||||
|
||||
+3
-3
@@ -184,7 +184,7 @@ public class JavaTypeTransformer {
|
||||
" in " + classType.getPresentableText() + "\n PsiClass: \n" + psiClass.getText());
|
||||
|
||||
for (TypeParameterDescriptor parameter : parameters) {
|
||||
arguments.add(new TypeProjection(ErrorUtils.createErrorType(parameter.getName().getName())));
|
||||
arguments.add(new TypeProjection(ErrorUtils.createErrorType(parameter.getName().asString())));
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -275,10 +275,10 @@ public class JavaTypeTransformer {
|
||||
if (!signatureTypeUsages.contains(originalTypeUsage)) {
|
||||
return originalTypeUsage;
|
||||
}
|
||||
if (JavaAnnotationResolver.findAnnotationWithExternal(owner, JvmAbi.JETBRAINS_MUTABLE_ANNOTATION.getFqName().getFqName()) != null) {
|
||||
if (JavaAnnotationResolver.findAnnotationWithExternal(owner, JvmAbi.JETBRAINS_MUTABLE_ANNOTATION.getFqName().asString()) != null) {
|
||||
return TypeUsage.MEMBER_SIGNATURE_COVARIANT;
|
||||
}
|
||||
if (JavaAnnotationResolver.findAnnotationWithExternal(owner, JvmAbi.JETBRAINS_READONLY_ANNOTATION.getFqName().getFqName()) != null) {
|
||||
if (JavaAnnotationResolver.findAnnotationWithExternal(owner, JvmAbi.JETBRAINS_READONLY_ANNOTATION.getFqName().asString()) != null) {
|
||||
return TypeUsage.MEMBER_SIGNATURE_CONTRAVARIANT;
|
||||
}
|
||||
return originalTypeUsage;
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ public abstract class JetTypeJetSignatureReader extends JetSignatureExceptionsAd
|
||||
public void visitClassType(String signatureName, boolean nullable, boolean forceReal) {
|
||||
FqName fqName = JvmClassName.bySignatureName(signatureName).getFqName();
|
||||
|
||||
enterClass(resolveClassDescriptorByFqName(fqName, forceReal), fqName.getFqName(), nullable);
|
||||
enterClass(resolveClassDescriptorByFqName(fqName, forceReal), fqName.asString(), nullable);
|
||||
}
|
||||
|
||||
private void enterClass(@Nullable ClassDescriptor classDescriptor, @NotNull String className, boolean nullable) {
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
package org.jetbrains.jet.lang.resolve.java;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassKind;
|
||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
|
||||
@@ -58,7 +56,7 @@ public class JvmAbi {
|
||||
}
|
||||
|
||||
public static String getPropertyDelegateName(@NotNull Name name) {
|
||||
return name.getName() + DELEGATED_PROPERTY_NAME_POSTFIX;
|
||||
return name.asString() + DELEGATED_PROPERTY_NAME_POSTFIX;
|
||||
}
|
||||
|
||||
private JvmAbi() {
|
||||
|
||||
@@ -91,7 +91,7 @@ public class JvmClassName {
|
||||
|
||||
List<String> innerClassNames = Lists.newArrayList();
|
||||
while (descriptor.getContainingDeclaration() instanceof ClassDescriptor) {
|
||||
innerClassNames.add(descriptor.getName().getName());
|
||||
innerClassNames.add(descriptor.getName().asString());
|
||||
descriptor = descriptor.getContainingDeclaration();
|
||||
assert descriptor != null;
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public class JvmClassName {
|
||||
|
||||
@NotNull
|
||||
private static String fqNameToInternalName(@NotNull FqName fqName) {
|
||||
return fqName.getFqName().replace('.', '/');
|
||||
return fqName.asString().replace('.', '/');
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
+1
-1
@@ -122,6 +122,6 @@ public class KotlinToJavaTypesMap extends JavaToKotlinClassMapBuilder {
|
||||
|
||||
public boolean isForceReal(@NotNull JvmClassName className) {
|
||||
return JvmPrimitiveType.getByWrapperClass(className) != null
|
||||
|| mappedTypeNames.contains(className.getFqName().getFqName());
|
||||
|| mappedTypeNames.contains(className.getFqName().asString());
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ public class PackageClassUtils {
|
||||
if (packageFQN.isRoot()) {
|
||||
return DEFAULT_PACKAGE;
|
||||
}
|
||||
return StringUtil.capitalize(packageFQN.shortName().getName()) + "Package";
|
||||
return StringUtil.capitalize(packageFQN.shortName().asString()) + "Package";
|
||||
}
|
||||
|
||||
public static FqName getPackageClassFqName(@NotNull FqName packageFQN) {
|
||||
|
||||
+3
-3
@@ -86,7 +86,7 @@ public class PsiClassFinderImpl implements PsiClassFinder {
|
||||
@Override
|
||||
@Nullable
|
||||
public PsiClass findPsiClass(@NotNull FqName qualifiedName, @NotNull RuntimeClassesHandleMode runtimeClassesHandleMode) {
|
||||
PsiClass original = javaFacade.findClass(qualifiedName.getFqName(), javaSearchScope);
|
||||
PsiClass original = javaFacade.findClass(qualifiedName.asString(), javaSearchScope);
|
||||
|
||||
if (original != null) {
|
||||
String classQualifiedName = original.getQualifiedName();
|
||||
@@ -106,7 +106,7 @@ public class PsiClassFinderImpl implements PsiClassFinder {
|
||||
|
||||
if (KotlinBuiltIns.BUILT_INS_PACKAGE_FQ_NAME.equals(qualifiedName.parent())) {
|
||||
PsiAnnotation assertInvisibleAnnotation = JavaAnnotationResolver.findOwnAnnotation(
|
||||
original, JvmStdlibNames.ASSERT_INVISIBLE_IN_RESOLVER.getFqName().getFqName());
|
||||
original, JvmStdlibNames.ASSERT_INVISIBLE_IN_RESOLVER.getFqName().asString());
|
||||
|
||||
if (assertInvisibleAnnotation != null) {
|
||||
switch (runtimeClassesHandleMode) {
|
||||
@@ -131,7 +131,7 @@ public class PsiClassFinderImpl implements PsiClassFinder {
|
||||
@Override
|
||||
@Nullable
|
||||
public PsiPackage findPsiPackage(@NotNull FqName qualifiedName) {
|
||||
return javaFacade.findPackage(qualifiedName.getFqName());
|
||||
return javaFacade.findPackage(qualifiedName.asString());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ public class TypeVariableResolverFromTypeDescriptors implements TypeVariableReso
|
||||
@NotNull DeclarationDescriptor owner,
|
||||
@NotNull String context) {
|
||||
for (TypeParameterDescriptor typeParameter : typeParameters) {
|
||||
if (typeParameter.getName().getName().equals(name)) {
|
||||
if (typeParameter.getName().asString().equals(name)) {
|
||||
return typeParameter;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -254,7 +254,7 @@ public class SignaturesPropagationData {
|
||||
public int compare(FunctionDescriptor fun1, FunctionDescriptor fun2) {
|
||||
FqNameUnsafe fqName1 = getFQName(fun1.getContainingDeclaration());
|
||||
FqNameUnsafe fqName2 = getFQName(fun2.getContainingDeclaration());
|
||||
return fqName1.getFqName().compareTo(fqName2.getFqName());
|
||||
return fqName1.asString().compareTo(fqName2.asString());
|
||||
}
|
||||
});
|
||||
return superFunctions;
|
||||
|
||||
+3
-3
@@ -99,14 +99,14 @@ public class TypeTransformingVisitor extends JetVisitor<JetType, Void> {
|
||||
}
|
||||
|
||||
private JetType visitCommonType(@NotNull ClassDescriptor classDescriptor, @NotNull JetTypeElement type) {
|
||||
return visitCommonType(DescriptorUtils.getFQName(classDescriptor).toSafe().getFqName(), type);
|
||||
return visitCommonType(DescriptorUtils.getFQName(classDescriptor).toSafe().asString(), type);
|
||||
}
|
||||
|
||||
private JetType visitCommonType(@NotNull String qualifiedName, @NotNull JetTypeElement type) {
|
||||
TypeConstructor originalTypeConstructor = originalType.getConstructor();
|
||||
ClassifierDescriptor declarationDescriptor = originalTypeConstructor.getDeclarationDescriptor();
|
||||
assert declarationDescriptor != null;
|
||||
String fqName = DescriptorUtils.getFQName(declarationDescriptor).toSafe().getFqName();
|
||||
String fqName = DescriptorUtils.getFQName(declarationDescriptor).toSafe().asString();
|
||||
ClassDescriptor classFromLibrary = getAutoTypeAnalogWithinBuiltins(qualifiedName);
|
||||
if (!isSameName(qualifiedName, fqName) && classFromLibrary == null) {
|
||||
throw new AlternativeSignatureMismatchException("Alternative signature type mismatch, expected: %s, actual: %s", qualifiedName, fqName);
|
||||
@@ -212,7 +212,7 @@ public class TypeTransformingVisitor extends JetVisitor<JetType, Void> {
|
||||
Collection<ClassDescriptor> descriptors =
|
||||
JavaToKotlinClassMap.getInstance().mapPlatformClass(JvmClassName.byType(javaAnalog).getFqName());
|
||||
for (ClassDescriptor descriptor : descriptors) {
|
||||
String fqName = DescriptorUtils.getFQName(descriptor).getFqName();
|
||||
String fqName = DescriptorUtils.getFQName(descriptor).asString();
|
||||
if (isSameName(qualifiedName, fqName)) {
|
||||
return descriptor;
|
||||
}
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ public class JetClassAnnotation extends PsiAnnotationWithAbiVersion {
|
||||
@NotNull
|
||||
public static JetClassAnnotation get(PsiClass psiClass) {
|
||||
PsiAnnotation annotation = JavaAnnotationResolver.findOwnAnnotation(psiClass,
|
||||
JvmStdlibNames.JET_CLASS.getFqName().getFqName());
|
||||
JvmStdlibNames.JET_CLASS.getFqName().asString());
|
||||
return annotation != null ? new JetClassAnnotation(annotation) : NULL_ANNOTATION;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ public class JetClassObjectAnnotation extends PsiAnnotationWithAbiVersion {
|
||||
@NotNull
|
||||
public static JetClassObjectAnnotation get(@NotNull PsiClass psiClass) {
|
||||
PsiAnnotation annotation =
|
||||
JavaAnnotationResolver.findOwnAnnotation(psiClass, JvmStdlibNames.JET_CLASS_OBJECT.getFqName().getFqName());
|
||||
JavaAnnotationResolver.findOwnAnnotation(psiClass, JvmStdlibNames.JET_CLASS_OBJECT.getFqName().asString());
|
||||
return annotation != null ? new JetClassObjectAnnotation(annotation) : NULL_ANNOTATION;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ public class JetConstructorAnnotation extends PsiAnnotationWithFlags {
|
||||
|
||||
public static JetConstructorAnnotation get(PsiMethod constructor) {
|
||||
PsiAnnotation annotation =
|
||||
JavaAnnotationResolver.findOwnAnnotation(constructor, JvmStdlibNames.JET_CONSTRUCTOR.getFqName().getFqName());
|
||||
JavaAnnotationResolver.findOwnAnnotation(constructor, JvmStdlibNames.JET_CONSTRUCTOR.getFqName().asString());
|
||||
return annotation != null ? new JetConstructorAnnotation(annotation) : NULL_ANNOTATION;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ public class JetMethodAnnotation extends PsiAnnotationWithFlags {
|
||||
|
||||
public static JetMethodAnnotation get(PsiMethod psiMethod) {
|
||||
PsiAnnotation annotation =
|
||||
JavaAnnotationResolver.findOwnAnnotation(psiMethod, JvmStdlibNames.JET_METHOD.getFqName().getFqName());
|
||||
JavaAnnotationResolver.findOwnAnnotation(psiMethod, JvmStdlibNames.JET_METHOD.getFqName().asString());
|
||||
return annotation != null ? new JetMethodAnnotation(annotation) : NULL_ANNOTATION;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ public class JetPackageClassAnnotation extends PsiAnnotationWithAbiVersion {
|
||||
@NotNull
|
||||
public static JetPackageClassAnnotation get(PsiClass psiClass) {
|
||||
PsiAnnotation annotation = JavaAnnotationResolver.findOwnAnnotation(psiClass,
|
||||
JvmStdlibNames.JET_PACKAGE_CLASS.getFqName().getFqName());
|
||||
JvmStdlibNames.JET_PACKAGE_CLASS.getFqName().asString());
|
||||
return annotation != null ? new JetPackageClassAnnotation(annotation) : NULL_ANNOTATION;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class JetTypeParameterAnnotation extends PsiAnnotationWrapper {
|
||||
@NotNull
|
||||
public static JetTypeParameterAnnotation get(@NotNull PsiParameter psiParameter) {
|
||||
PsiAnnotation annotation =
|
||||
JavaAnnotationResolver.findOwnAnnotation(psiParameter, JvmStdlibNames.JET_TYPE_PARAMETER.getFqName().getFqName());
|
||||
JavaAnnotationResolver.findOwnAnnotation(psiParameter, JvmStdlibNames.JET_TYPE_PARAMETER.getFqName().asString());
|
||||
return annotation != null ? new JetTypeParameterAnnotation(annotation) : NULL_ANNOTATION;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ public class JetValueParameterAnnotation extends PsiAnnotationWrapper {
|
||||
|
||||
public static JetValueParameterAnnotation get(PsiParameter psiParameter) {
|
||||
PsiAnnotation annotation =
|
||||
JavaAnnotationResolver.findOwnAnnotation(psiParameter, JvmStdlibNames.JET_VALUE_PARAMETER.getFqName().getFqName());
|
||||
JavaAnnotationResolver.findOwnAnnotation(psiParameter, JvmStdlibNames.JET_VALUE_PARAMETER.getFqName().asString());
|
||||
return annotation != null ? new JetValueParameterAnnotation(annotation) : NULL_ANNOTATION;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ public class KotlinSignatureAnnotation extends PsiAnnotationWrapper {
|
||||
@NotNull
|
||||
public static KotlinSignatureAnnotation get(PsiModifierListOwner psiModifierListOwner) {
|
||||
PsiAnnotation annotation =
|
||||
JavaAnnotationResolver.findAnnotationWithExternal(psiModifierListOwner, JvmStdlibNames.KOTLIN_SIGNATURE.getFqName().getFqName());
|
||||
JavaAnnotationResolver.findAnnotationWithExternal(psiModifierListOwner, JvmStdlibNames.KOTLIN_SIGNATURE.getFqName().asString());
|
||||
return annotation != null ? new KotlinSignatureAnnotation(annotation) : NULL_ANNOTATION;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -413,7 +413,7 @@ public final class MembersCache {
|
||||
return null;
|
||||
}
|
||||
String qualifiedName = psiClass.getQualifiedName();
|
||||
if (qualifiedName == null || qualifiedName.startsWith(KotlinBuiltIns.BUILT_INS_PACKAGE_FQ_NAME.getFqName() + ".")) {
|
||||
if (qualifiedName == null || qualifiedName.startsWith(KotlinBuiltIns.BUILT_INS_PACKAGE_FQ_NAME.asString() + ".")) {
|
||||
return null;
|
||||
}
|
||||
if (!psiClass.isInterface() || psiClass.isAnnotationType()) {
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ public final class JavaAnnotationResolver {
|
||||
}
|
||||
|
||||
// Don't process internal jet annotations and jetbrains NotNull annotations
|
||||
if (qname.startsWith("jet.runtime.typeinfo.") || qname.equals(JvmAbi.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().getFqName())) {
|
||||
if (qname.startsWith("jet.runtime.typeinfo.") || qname.equals(JvmAbi.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().asString())) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -131,7 +131,7 @@ public final class JavaClassObjectResolver {
|
||||
ClassDescriptorFromJvmBytecode classObjectDescriptor =
|
||||
new ClassDescriptorFromJvmBytecode(containing, ClassKind.CLASS_OBJECT, false);
|
||||
ClassPsiDeclarationProvider data = semanticServices.getPsiDeclarationProviderFactory().createSyntheticClassObjectClassData(psiClass);
|
||||
setUpClassObjectDescriptor(classObjectDescriptor, containing, fqName, data, getClassObjectName(containing.getName().getName()));
|
||||
setUpClassObjectDescriptor(classObjectDescriptor, containing, fqName, data, getClassObjectName(containing.getName().asString()));
|
||||
return classObjectDescriptor;
|
||||
}
|
||||
|
||||
|
||||
+3
-4
@@ -44,7 +44,6 @@ import org.jetbrains.jet.lang.resolve.name.FqNameBase;
|
||||
import org.jetbrains.jet.lang.resolve.name.FqNameUnsafe;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.TypeSubstitutor;
|
||||
import org.jetbrains.jet.lang.types.TypeUtils;
|
||||
|
||||
import javax.inject.Inject;
|
||||
@@ -203,7 +202,7 @@ public final class JavaClassResolver {
|
||||
|
||||
private static boolean isTraitImplementation(@NotNull FqName qualifiedName) {
|
||||
// TODO: only if -$$TImpl class is created by Kotlin
|
||||
return qualifiedName.getFqName().endsWith(JvmAbi.TRAIT_IMPL_SUFFIX);
|
||||
return qualifiedName.asString().endsWith(JvmAbi.TRAIT_IMPL_SUFFIX);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -295,7 +294,7 @@ public final class JavaClassResolver {
|
||||
String containerQualifiedName = methodContainer.getQualifiedName();
|
||||
assert containerQualifiedName != null : "qualified name is null for " + psiClass;
|
||||
|
||||
if (DescriptorUtils.getFQName(samInterface).getFqName().equals(containerQualifiedName)) {
|
||||
if (DescriptorUtils.getFQName(samInterface).asString().equals(containerQualifiedName)) {
|
||||
SimpleFunctionDescriptor abstractMethod =
|
||||
functionResolver.resolveFunctionMutely(new PsiMethodWrapper(samInterfaceMethod), samInterface);
|
||||
assert abstractMethod != null : "couldn't resolve method " + samInterfaceMethod;
|
||||
@@ -378,7 +377,7 @@ public final class JavaClassResolver {
|
||||
private static FqNameUnsafe javaClassToKotlinFqName(@NotNull FqName rawFqName) {
|
||||
List<Name> correctedSegments = new ArrayList<Name>();
|
||||
for (Name segment : rawFqName.pathSegments()) {
|
||||
if (JvmAbi.CLASS_OBJECT_CLASS_NAME.equals(segment.getName())) {
|
||||
if (JvmAbi.CLASS_OBJECT_CLASS_NAME.equals(segment.asString())) {
|
||||
assert !correctedSegments.isEmpty();
|
||||
Name previous = correctedSegments.get(correctedSegments.size() - 1);
|
||||
correctedSegments.add(DescriptorUtils.getClassObjectName(previous));
|
||||
|
||||
+2
-2
@@ -125,7 +125,7 @@ public final class JavaFunctionResolver {
|
||||
// TODO: unless maybe class explicitly extends Object
|
||||
assert containingClass != null;
|
||||
String ownerClassName = containingClass.getQualifiedName();
|
||||
if (DescriptorResolverUtils.OBJECT_FQ_NAME.getFqName().equals(ownerClassName)) {
|
||||
if (DescriptorResolverUtils.OBJECT_FQ_NAME.asString().equals(ownerClassName)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -439,7 +439,7 @@ public final class JavaFunctionResolver {
|
||||
transformedType = typeTransformer.transformToType(returnType, typeUsage, typeVariableResolver);
|
||||
}
|
||||
|
||||
if (JavaAnnotationResolver.findAnnotationWithExternal(method.getPsiMethod(), JvmAbi.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().getFqName()) !=
|
||||
if (JavaAnnotationResolver.findAnnotationWithExternal(method.getPsiMethod(), JvmAbi.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().asString()) !=
|
||||
null) {
|
||||
return TypeUtils.makeNullableAsSpecified(transformedType, false);
|
||||
}
|
||||
|
||||
+1
-1
@@ -392,7 +392,7 @@ public final class JavaPropertyResolver {
|
||||
|
||||
boolean hasNotNullAnnotation = JavaAnnotationResolver.findAnnotationWithExternal(
|
||||
characteristicMember.getType().getPsiNotNullOwner(),
|
||||
JvmAbi.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().getFqName()) != null;
|
||||
JvmAbi.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().asString()) != null;
|
||||
|
||||
if (hasNotNullAnnotation || members.isStaticFinalField()) {
|
||||
propertyType = TypeUtils.makeNotNullable(propertyType);
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ public final class JavaValueParameterResolver {
|
||||
else {
|
||||
|
||||
JetType transformedType;
|
||||
if (JavaAnnotationResolver.findAnnotationWithExternal(parameter.getPsiParameter(), JvmAbi.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().getFqName()) !=
|
||||
if (JavaAnnotationResolver.findAnnotationWithExternal(parameter.getPsiParameter(), JvmAbi.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().asString()) !=
|
||||
null) {
|
||||
transformedType = TypeUtils.makeNullableAsSpecified(outType, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user