Get the class hierarchy tree for the given class.

@param type the class to print the hierarchy for
@return a content tree for class inheritence
169563
private Content getClassInheritenceTree(Type type) {
        Type sup;
        HtmlTree classTreeUl = new HtmlTree(HtmlTag.UL);
        classTreeUl.addStyle(HtmlStyle.inheritance);
        Content liTree = null;
        do {
            sup = utils.getFirstVisibleSuperClass(
                    type instanceof ClassDoc ? (ClassDoc) type : type.asClassDoc(),
                    configuration);
            if (sup != null) {
                HtmlTree ul = new HtmlTree(HtmlTag.UL);
                ul.addStyle(HtmlStyle.inheritance);
                ul.addContent(getTreeForClassHelper(type));
                if (liTree != null)
                    ul.addContent(liTree);
                Content li = HtmlTree.LI(ul);
                liTree = li;
                type = sup;
            }
            else
                classTreeUl.addContent(getTreeForClassHelper(type));
        }
        while (sup != null);
        if (liTree != null)
            classTreeUl.addContent(liTree);
        return classTreeUl;
    }
1318082
public static Type getTypeHierarchy(List<Type> typeHierarchy, Type t, Class<?> stopAtClass) {
		while (!(isClassType(t) && typeToClass(t).equals(stopAtClass))) {
			typeHierarchy.add(t);
			t = typeToClass(t).getGenericSuperclass();

			if (t == null) {
				break;
			}
		}
		return t;
	}
965903
private static List<Class<?>> getAllSerializableInTree(Class<?> type) {
        List<Class<?>> list = new ArrayList<>();
        addAllSerializableInTree(type, list);
        return list;
    }
737687
public Content getClassHeader(TypeElement typeElement) {
        Content classLink = (isVisibleClass(typeElement))
                ? getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.DEFAULT, typeElement)
                        .label(configuration.getClassName(typeElement)))
                : new StringContent(utils.getFullyQualifiedName(typeElement));
        Content li = HtmlTree.LI(HtmlStyle.blockList, getMarkerAnchor(
                utils.getFullyQualifiedName(typeElement)));
        Content superClassLink = typeElement.getSuperclass() != null
                ? getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.SERIALIZED_FORM,
                        typeElement.getSuperclass()))
                : null;

        //Print the heading.
        Content className = superClassLink == null ?
            configuration.getContent(
            "doclet.Class_0_implements_serializable", classLink) :
            configuration.getContent(
            "doclet.Class_0_extends_implements_serializable", classLink,
            superClassLink);
        li.addContent(HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING,
                className));
        return li;
    }
1366422
public static Stack<Class<?>> getClassHierarchy(final Class<?> clazz) {
        final Stack<Class<?>> classHierarchy = new Stack<Class<?>>();
        Class<?> c = clazz;
        while (c != null) {
            classHierarchy.push(c);
            c = (isStatic(c.getModifiers())) ? null : c.getEnclosingClass();
        }
        return classHierarchy;
    }
821673
public <T> Set<Class<? extends T>> getSubTypesOf(final Class<T> type) {
        return Sets.newHashSet(ReflectionUtils.<T>forNames(
                store.getAll(index(SubTypesScanner.class), Arrays.asList(type.getName())), loaders()));
    }
236546
public static Node getChild(Node parent, int type) {
        Node n = parent.getFirstChild();
        while (n != null && type != n.getNodeType()) {
            n = n.getNextSibling();
        }
        if (n == null) return null;
        return n;
    }
406302
public static final ClassInfo get(Class<?> type) {
    ClassInfo exist = cache.get(type);
    if (null != exist) return exist;
    synchronized (cache) {
      exist = cache.get(type);
      if (null != exist) return exist;

      Set<MethodInfo> methods = CollectUtils.newHashSet();
      Class<?> nextClass = type;
      int index = 0;
      Map<String, Class<?>> nextParamTypes = null;
      while (null != nextClass && Object.class != nextClass) {
        Method[] declaredMethods = nextClass.getDeclaredMethods();
        for (int i = 0, n = declaredMethods.length; i < n; i++) {
          Method method = declaredMethods[i];
          if (!goodMethod(method)) continue;
          Type[] types = method.getGenericParameterTypes();
          Class<?>[] paramsTypes = new Class<?>[types.length];
          for (int j = 0; j < types.length; j++) {
            Type t = types[j];
            if (t instanceof ParameterizedType) {
              paramsTypes[j] = (Class<?>) ((ParameterizedType) t).getRawType();
            } else if (t instanceof TypeVariable) {
              paramsTypes[j] = nextParamTypes.get(((TypeVariable<?>) t).getName());
            } else {
              paramsTypes[j] = (Class<?>) t;
            }
            if (null == paramsTypes[j]) paramsTypes[j] = Object.class;
          }
          if (!methods.add(new MethodInfo(index++, method, paramsTypes))) index--;
        }

        Type nextType = nextClass.getGenericSuperclass();
        nextClass = nextClass.getSuperclass();
        if (nextType instanceof ParameterizedType) {
          Map<String, Class<?>> tmp = CollectUtils.newHashMap();
          Type[] ps = ((ParameterizedType) nextType).getActualTypeArguments();
          TypeVariable<?>[] tvs = nextClass.getTypeParameters();
          for (int k = 0; k < ps.length; k++) {
            if (ps[k] instanceof Class<?>) {
              tmp.put(tvs[k].getName(), (Class<?>) ps[k]);
            } else if (ps[k] instanceof TypeVariable) {
              tmp.put(tvs[k].getName(), nextParamTypes.get(((TypeVariable<?>) ps[k]).getName()));
            }
          }
          nextParamTypes = tmp;
        } else {
          nextParamTypes = Collections.emptyMap();
        }
      }
      exist = new ClassInfo(methods);
      cache.put(type, exist);
      return exist;
    }
  }
339299
public String getTreeSite(String type) {

        String result = m_treeSite.get(type);
        return result;
    }
177970
public static Class<?> getClassFromType(final Type type) {
        Class<?> returnClass = null;
        if (type instanceof Class<?>) {
            returnClass = (Class<?>) type;
        } else if (type instanceof ParameterizedType) {
            returnClass = getClassFromType(((ParameterizedType) type).getRawType());
        }
        return returnClass;
    }
132539
@Override
    public <T extends Principal> Set<T> getPrincipalsByType(Class<T> type) {
        //Get the caller principal from the caller subject
        Subject callerSubject = getCallerSubject();

        if (callerSubject != null) {
            //Get the prinicipals by type
            Set<T> principals = callerSubject.getPrincipals(type);
            return principals;
        }

        return null;

    }
387057
private static Class getClassForClassNode(ClassNode type) {
        // todo hamlet - move to a different "InferenceUtil" object
        Class primitiveType = getPrimitiveType(type);
        if (primitiveType != null) {
            return primitiveType;
        } else if (classNodeImplementsType(type, String.class)) {
            return String.class;
        } else if (classNodeImplementsType(type, ReentrantLock.class)) {
            return ReentrantLock.class;
        } else if (type.getName() != null && type.getName().endsWith("[]")) {
            return Object[].class;       // better type inference could be done, but oh well
        }
        return null;
    }
466050
public ClassNode lookupClassNodeFor(String type) {
        for (ClassNode cn : typeCheckingVisitor.getSourceUnit().getAST().getClasses()) {
            if (cn.getName().equals(type))
                return cn;
        }

        return null;
    }
1154818
public static <T> TypeReference<T> get(Class<T> type) {
		return new SimpleTypeReference<T>(type);
	}
1039613
public static IEntityGroup getRootGroup(Class<?> type) throws GroupsException {
        LOGGER.trace("Invoking getRootGroup for type='{}'", type);
        return instance().igetRootGroup(type);
    }
210276
public String getLiteralType(Type type) {
		String result = "";
		if (type != null) {
			if (ParameterizedType.class.isAssignableFrom(type.getClass())) {
				ParameterizedType parameterizedType = (ParameterizedType) type;
				result = parameterizedType.toString();
			} else {
				result = ((Class) type).getCanonicalName();
			}
		}
		return result;
	}
19285
public <T> JsonReaderI<T> getMapper(Class<T> type) {
		// look for cached Mapper
		@SuppressWarnings("unchecked")
		JsonReaderI<T> map = (JsonReaderI<T>) cache.get(type);
		if (map != null)
			return map;
		/*
		 * Special handle
		 */
		if (type instanceof Class) {
			if (Map.class.isAssignableFrom(type))
				map = new DefaultMapperCollection<T>(this, type);
			else if (List.class.isAssignableFrom(type))
				map = new DefaultMapperCollection<T>(this, type);
			if (map != null) {
				cache.put(type, map);
				return map;
			}
		}

		if (type.isArray())
			map = new ArraysMapper.GenericMapper<T>(this, type);
		else if (List.class.isAssignableFrom(type))
			map = new CollectionMapper.ListClass<T>(this, type);
		else if (Map.class.isAssignableFrom(type))
			map = new CollectionMapper.MapClass<T>(this, type);
		else
			// use bean class
			map = new BeansMapper.Bean<T>(this, type);
		cache.putIfAbsent(type, map);
		return map;
	}