[LL] don't include kotlin classes in combined java provider
do not resolve annotations when short name doesn't match
This commit is contained in:
@@ -53,7 +53,7 @@ val JavaClass.classKind: ClassKind
|
||||
}
|
||||
|
||||
fun JavaClass.hasMetadataAnnotation(): Boolean =
|
||||
annotations.any { it.classId?.asSingleFqName() == JvmAnnotationNames.METADATA_FQ_NAME }
|
||||
annotations.any { it.isResolvedTo(JvmAnnotationNames.METADATA_FQ_NAME) }
|
||||
|
||||
internal fun Any?.createConstantOrError(session: FirSession): FirExpression {
|
||||
return createConstantIfAny(session) ?: buildErrorExpression {
|
||||
|
||||
+10
@@ -31,6 +31,7 @@ import org.jetbrains.kotlin.name.FqName;
|
||||
import org.jetbrains.kotlin.name.Name;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Objects;
|
||||
|
||||
import static org.jetbrains.kotlin.load.java.structure.impl.JavaElementCollectionFromPsiArrayUtil.namedAnnotationArguments;
|
||||
|
||||
@@ -95,6 +96,15 @@ public class JavaAnnotationImpl extends JavaElementImpl<PsiAnnotation> implement
|
||||
return externalAnnotationManager.isExternalAnnotation(psi);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isResolvedTo(@NotNull FqName fqName) {
|
||||
PsiJavaCodeReferenceElement referenceElement = getPsi().getNameReferenceElement();
|
||||
if (referenceElement == null || !Objects.equals(referenceElement.getReferenceName(), fqName.shortNameOrSpecial().asString())) {
|
||||
return false;
|
||||
}
|
||||
return getPsi().hasQualifiedName(fqName.asString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFreshlySupportedTypeUseAnnotation() {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user