Package org.eclipse.jdt.internal.corext.util

Examples of org.eclipse.jdt.internal.corext.util.MethodOverrideTester


  public static ITypeHierarchy getTypeHierarchy(IType type) throws JavaModelException {
    return getTypeHierarchy(type, null);
  }

  public static MethodOverrideTester getMethodOverrideTester(IType type) throws JavaModelException {
    MethodOverrideTester test = null;
    synchronized (fgMethodOverrideTesterCache) {
      test = fgMethodOverrideTesterCache.get(type);
    }
    if (test == null) {
      ITypeHierarchy hierarchy = getTypeHierarchy(type); // don't nest the locks
      synchronized (fgMethodOverrideTesterCache) {
        test = fgMethodOverrideTesterCache.get(type); // test again after waiting a long time for 'getTypeHierarchy'
        if (test == null) {
          test = new MethodOverrideTester(type, hierarchy);
          fgMethodOverrideTesterCache.put(type, test);
        }
      }
    }
    return test;
View Full Code Here


  }

  private static void removeMethodOverrideTester(ITypeHierarchy hierarchy) {
    synchronized (fgMethodOverrideTesterCache) {
      for (Iterator iter = fgMethodOverrideTesterCache.values().iterator(); iter.hasNext();) {
        MethodOverrideTester curr = (MethodOverrideTester) iter.next();
        if (curr.getTypeHierarchy().equals(hierarchy)) {
          iter.remove();
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.corext.util.MethodOverrideTester

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.