@Override protected void doVisitArrayTypeReference(ArrayTypeReference reference, ParameterizedTypeReference declaration) { JvmType type = declaration.getType(); if (type instanceof JvmTypeParameter) { if (shouldProcess((JvmTypeParameter) type)) { JvmTypeParameter typeParameter = (JvmTypeParameter) type; processTypeParameter(typeParameter, reference); } } }
@Override protected void doVisitUnboundTypeReference(UnboundTypeReference reference, ArrayTypeReference declaration) { if (shouldProcess(reference.getTypeParameter())) { processTypeParameter(reference.getTypeParameter(), declaration); } }
@Override protected void doVisitParameterizedTypeReference(ParameterizedTypeReference reference, ParameterizedTypeReference declaration) { JvmType type = declaration.getType(); if (type instanceof JvmTypeParameter) { if (type != reference.getType() && shouldProcess((JvmTypeParameter) type)) { JvmTypeParameter typeParameter = (JvmTypeParameter) type; processTypeParameter(typeParameter, reference); } } else if (type instanceof JvmTypeParameterDeclarator && !((JvmTypeParameterDeclarator) type).getTypeParameters().isEmpty() && !declaration.getTypeArguments().isEmpty()) { doVisitMatchingTypeParameters(reference, declaration); } }
@Override protected void doVisitParameterizedTypeReference(ParameterizedTypeReference reference, ArrayTypeReference declaration) { JvmType type = reference.getType(); if (type instanceof JvmTypeParameter) { if (shouldProcess((JvmTypeParameter) type)) { JvmTypeParameter typeParameter = (JvmTypeParameter) type; processTypeParameter(typeParameter, declaration); } } else { LightweightTypeReference declarationAsList = declaration.tryConvertToListType(); outerVisit(declarationAsList, reference); } }
@Override protected void doVisitTypeReference(LightweightTypeReference reference, UnboundTypeReference declaration) { if (declaration.internalIsResolved() || getOwner().isResolved(declaration.getHandle())) { declaration.tryResolve(); outerVisit(declaration, reference, declaration, getExpectedVariance(), getActualVariance()); } else { processTypeParameter(declaration.getTypeParameter(), reference); } }