/** * Method to visit a super class hierarchy defined by a given type. * * @param type the type which super class hierarchy is to be visited * @param visitor the visitor * @return <code>false</code> if the visiting got interrupted */ public static boolean visitSuperclasses(ITypeBinding type, TypeBindingVisitor visitor) { while ((type= type.getSuperclass()) != null) { if (!visitor.visit(type)) { return false; } } return true; }
/** * Method to visit a interface hierarchy defined by a given type. * * @param type the type which interface hierarchy is to be visited * @param visitor the visitor * @return <code>false</code> if the visiting got interrupted */ public static boolean visitInterfaces(ITypeBinding type, TypeBindingVisitor visitor) { ITypeBinding[] interfaces= type.getInterfaces(); for (int i= 0; i < interfaces.length; i++) { if (!visitor.visit(interfaces[i])) { return false; } } return true; }
/** * Method to visit a super class hierarchy defined by a given type. * The given type itself is not visited. * * @param type the type whose super class hierarchy is to be visited * @param visitor the visitor * @return <code>true</code> if all types were visited, * or <code>false</code> if the visiting got aborted because the <code>visit</code> * method returned <code>false</code> for a type */ public static boolean visitSuperclasses(ITypeBinding type, TypeBindingVisitor visitor) { while ((type= type.getSuperclass()) != null) { if (!visitor.visit(type)) { return false; } } return true; }
/** * Method to visit a super class hierarchy defined by a given type. * The given type itself is not visited. * * @param type the type whose super class hierarchy is to be visited * @param visitor the visitor * @return <code>true</code> if all types were visited, * or <code>false</code> if the visiting got aborted because the <code>visit</code> * method returned <code>false</code> for a type */ public static boolean visitSuperclasses(ITypeBinding type, TypeBindingVisitor visitor) { while ((type= type.getSuperclass()) != null) { if (!visitor.visit(type)) { return false; } } return true; }
private static boolean visitInterfaces(ITypeBinding type, TypeBindingVisitor visitor, HashSet<ITypeBinding> visited) { boolean unvisited= visited.add(type); if (!unvisited) return true; ITypeBinding[] interfaces= type.getInterfaces(); for (int i= 0; i < interfaces.length; i++) { if (!visitor.visit(interfaces[i])) { return false; } if (!visitInterfaces(interfaces[i], visitor, visited)) { return false; } } return true; }
private static boolean visitInterfaces(ITypeBinding type, TypeBindingVisitor visitor, HashSet<ITypeBinding> visited) { boolean unvisited= visited.add(type); if (!unvisited) return true; ITypeBinding[] interfaces= type.getInterfaces(); for (int i= 0; i < interfaces.length; i++) { if (!visitor.visit(interfaces[i])) { return false; } if (!visitInterfaces(interfaces[i], visitor, visited)) { return false; } } return true; }
@Override public boolean visit(SimpleName node) { ITypeBinding binding= node.resolveTypeBinding(); if (binding != null) { boolean res= fVisitor.visit(binding); if (res) { res= Bindings.visitHierarchy(binding, fVisitor); } if (!res) { throw new VisitCancelledException(); } } return false; } }
public boolean visit(SimpleName node) { ITypeBinding binding= node.resolveTypeBinding(); if (binding != null) { boolean res= fVisitor.visit(binding); if (res) { res= Bindings.visitHierarchy(binding, fVisitor); } if (!res) { throw new VisitCancelledException(); } } return false; } }
@Override public boolean visit(SimpleName node) { ITypeBinding binding= node.resolveTypeBinding(); if (binding != null) { boolean res= fVisitor.visit(binding); if (res) { res= Bindings.visitHierarchy(binding, fVisitor); } if (!res) { throw new VisitCancelledException(); } } return false; } }
if (invocationTargetType != null) { TypeBindingVisitor visitor= new AmbiguousTargetMethodAnalyzer(invocationTargetType, methodBinding, argumentIndex, argumentCount, expressionIsExplicitlyTyped); return !(visitor.visit(invocationTargetType) && Bindings.visitHierarchy(invocationTargetType, visitor));
if (invocationTargetType != null) { TypeBindingVisitor visitor= new AmbiguousTargetMethodAnalyzer(invocationTargetType, methodBinding, argumentIndex, argumentCount, expressionIsExplicitlyTyped); return !(visitor.visit(invocationTargetType) && Bindings.visitHierarchy(invocationTargetType, visitor));
TypeBindingVisitor visitor= new AmbiguousMethodAnalyzer( fTypeEnvironment, method, fTypeEnvironment.create(parameters)); if(!visitor.visit(type)) { return true; } else if (type.isInterface()) {
TypeBindingVisitor visitor= new AmbiguousMethodAnalyzer( fTypeEnvironment, method, fTypeEnvironment.create(parameters)); if(!visitor.visit(type)) { return true; } else if (type.isInterface()) {
TypeBindingVisitor visitor= new AmbiguousMethodAnalyzer( fTypeEnvironment, method, fTypeEnvironment.create(parameters)); if(!visitor.visit(type)) { return true;