private boolean appendJvmTypeName(@NonNull StringBuilder signature, @NonNull PsiClass outerClass) { String className = getInternalName(outerClass); if (className == null) { return false; } signature.append('L').append(className.replace('.', '/')).append(';'); return true; }
@Nullable @Override public String getInternalName(@NonNull PsiClassType psiClassType) { if (psiClassType instanceof EcjPsiClassType) { ReferenceBinding binding = ((EcjPsiClassType) psiClassType).getBinding(); if (binding.compoundName != null) { return EcjPsiManager.getInternalName(binding.compoundName); } } return super.getInternalName(psiClassType); }
String classTypeInternal = evaluator.getInternalName(classType); String interfaceTypeInternal = evaluator.getInternalName(interfaceType); if (interfaceTypeInternal == null || classTypeInternal == null) { return;
private void checkClassType( @NonNull PsiElement element, @NonNull PsiClassType classType, @Nullable String descriptor) { String owner = mContext.getEvaluator().getInternalName(classType); String fqcn = classType.getCanonicalText(); if (owner != null && fqcn != null) { checkClass(element, descriptor, owner, fqcn); } }
private void checkClass( @NonNull PsiElement element, @NonNull PsiClass cls, @Nullable String descriptor) { String owner = mContext.getEvaluator().getInternalName(cls); if (owner == null) { return; } String fqcn = cls.getQualifiedName(); if (fqcn != null) { checkClass(element, descriptor, owner, fqcn); } }
@Nullable public String getInternalName(@NonNull PsiClass psiClass) { String qualifiedName = psiClass.getQualifiedName(); if (qualifiedName == null) { qualifiedName = psiClass.getName(); if (qualifiedName == null) { assert psiClass instanceof PsiAnonymousClass; //noinspection ConstantConditions return getInternalName(psiClass.getContainingClass()); } } return ClassContext.getInternalName(qualifiedName); }
String owner = evaluator.getInternalName(containingClass); if (owner == null) { return; // Couldn't resolve type
@Nullable @Override public String getInternalName(@NonNull PsiClass psiClass) { ReferenceBinding binding = null; if (psiClass instanceof EcjPsiClass) { //noinspection ConstantConditions Object nativeNode = ((EcjPsiClass) psiClass).getNativeNode(); binding = ((EcjPsiClass) psiClass).getBinding(); if (nativeNode instanceof TypeDeclaration) { binding = ((TypeDeclaration) nativeNode).binding; } } else if (psiClass instanceof EcjPsiBinaryClass) { Binding binaryBinding = ((EcjPsiBinaryClass) psiClass).getBinding(); if (binaryBinding instanceof ReferenceBinding) { binding = (ReferenceBinding) binaryBinding; } } else if (psiClass instanceof EcjPsiTypeParameter) { Object nativeNode = ((EcjPsiTypeParameter) psiClass).getNativeNode(); if (nativeNode instanceof TypeParameter) { TypeVariableBinding b = ((TypeParameter) nativeNode).binding; if (b.superclass != null) { binding = b.superclass; } } } if (binding == null) { return super.getInternalName(psiClass); } return EcjPsiManager.getInternalName(binding.compoundName); }
PsiType type = value.getType(); if (type instanceof PsiClassType) { String expressionOwner = evaluator.getInternalName((PsiClassType)type); if (expressionOwner == null) { return;
String signature = mContext.getEvaluator().getInternalName(resolved); if (signature == null) { return;
String desc = evaluator.getInternalDescription(superMethod, false, false); if (desc != null) { String owner = evaluator.getInternalName(cls); if (owner == null) { return;
return false; String owner = mContext.getEvaluator().getInternalName(containingClass); if (owner == null) { return false;
String owner = evaluator.getInternalName(containingClass); if (owner == null) { return; // Couldn't resolve type PsiType type = qualifier.getType(); if (type instanceof PsiClassType) { String expressionOwner = evaluator.getInternalName((PsiClassType) type); if (expressionOwner != null && !expressionOwner.equals(owner)) { int specificApi = mApiDatabase String expressionOwner = evaluator.getInternalName(cls); if (expressionOwner == null || "java/lang/Object".equals(expressionOwner)) { break;