Extract method
This commit is contained in:
+8
-5
@@ -105,11 +105,7 @@ public final class JavaAnnotationResolver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Don't process internal jet annotations and jetbrains NotNull annotations
|
// Don't process internal jet annotations and jetbrains NotNull annotations
|
||||||
if (fqName.asString().startsWith("jet.runtime.typeinfo.")
|
if (isSpecialAnnotation(fqName)) {
|
||||||
|| fqName.equals(JETBRAINS_NOT_NULL_ANNOTATION)
|
|
||||||
|| fqName.equals(JvmAnnotationNames.KOTLIN_CLASS)
|
|
||||||
|| fqName.equals(JvmAnnotationNames.KOTLIN_PACKAGE)
|
|
||||||
) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,6 +142,13 @@ public final class JavaAnnotationResolver {
|
|||||||
return annotation;
|
return annotation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isSpecialAnnotation(@NotNull FqName fqName) {
|
||||||
|
return fqName.asString().startsWith("jet.runtime.typeinfo.")
|
||||||
|
|| fqName.equals(JETBRAINS_NOT_NULL_ANNOTATION)
|
||||||
|
|| fqName.equals(JvmAnnotationNames.KOTLIN_CLASS)
|
||||||
|
|| fqName.equals(JvmAnnotationNames.KOTLIN_PACKAGE);
|
||||||
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public JavaAnnotation findAnnotationWithExternal(@NotNull JavaAnnotationOwner owner, @NotNull FqName name) {
|
public JavaAnnotation findAnnotationWithExternal(@NotNull JavaAnnotationOwner owner, @NotNull FqName name) {
|
||||||
JavaAnnotation annotation = owner.findAnnotation(name);
|
JavaAnnotation annotation = owner.findAnnotation(name);
|
||||||
|
|||||||
Reference in New Issue
Block a user