Returns all enclosing classes in this, outermost first.
351435
private List<ClassName> enclosingClasses() {
    List<ClassName> result = new ArrayList<>();
    for (ClassName c = this; c != null; c = c.enclosingClassName) {
      result.add(c);
    }
    Collections.reverse(result);
    return result;
  }
1346430
def _toplevel(cls):
        
        superclasses = (
            list(set(ClosureModel.__subclasses__()) &
                 set(cls._meta.get_parent_list()))
        )
        return next(iter(superclasses)) if superclasses else cls
559916
public Set<ClassModel> getAllClassDependencies() {
		HashSet<ClassModel> result = new HashSet<>();
		ClassModel.getAllClassDependencies(result, this);
		return result;
	}
966668
public GroovyClassDoc[] innerClasses() {
        Collections.sort(nested);
        return nested.toArray(new GroovyClassDoc[nested.size()]);
    }
977842
@Override
	public Set<Class<?>> getClasses()
	{
		Set<Class<?>> classes = new HashSet<>();
		classes.add(HelloResource.class);
		return classes;
	}
745508
private Set<Class<?>> getClasses() {
		HashSet<Class<?>> result = new HashSet<Class<?>>();
		
		// in case of override only the last global configuration must be analyzed
		JGlobalMap jGlobalMap = null;
		
		for (Class<?> clazz : getAllsuperClasses(configuredClass)) {
			
			// only if global configuration is null will be searched global configuration on super classes
			if(isNull(jGlobalMap)){
				
				jGlobalMap = clazz.getAnnotation(JGlobalMap.class);
				//if the field configuration is defined in the global map
				if(!isNull(jGlobalMap)){
					addClasses(jGlobalMap.classes(),result);
					if(!isNull(jGlobalMap.excluded()))
						for (Field field : getListOfFields(configuredClass)){ 
							JMap jMap = field.getAnnotation(JMap.class);
							if(!isNull(jMap)) 
								for (String fieldName : jGlobalMap.excluded()) 
									if(field.getName().equals(fieldName))
										addClasses(jMap.classes(),result,field.getName());
						}
					
					return result;
				}
			}
		}
		
		for (Field field : getListOfFields(configuredClass)){ 
			JMap jMap = field.getAnnotation(JMap.class);
			if(!isNull(jMap)) addClasses(jMap.classes(),result,field.getName());
		}	
		
		return result;	
	}
321870
def classes(p: ecore.EPackage):
        """"""
        classes = (c for c in p.eClassifiers if isinstance(c, ecore.EClass))
        return sorted(classes, key=lambda c: len(set(c.eAllSuperTypes())))
163925
Set<Class<?>> allClasses() {
        final Set<Class<?>> allClasses = new HashSet<>(getClasses());
        for (Object singleton : getSingletons()) {
            allClasses.add(singleton.getClass());
        }
        return allClasses;
    }
668889
public static List<Class<?>> getAllClasses(Class<?> clazz) {
        List<Class<?>> types = new ArrayList<>();
        while (clazz != null) {
            types.add(clazz);
            clazz = clazz.getSuperclass();
        }
        return types;
    }
936433
public static Class[] getSuperTypes(Class from) {
        ArrayList<Class> superclasses = new ArrayList<Class>();

        collectInterfaces( from, superclasses );
        while ( !from.equals( Object.class ) && !from.isInterface() ) {
            superclasses.add( from.getSuperclass() );
            from = from.getSuperclass();
            collectInterfaces( from, superclasses );
        }

        final Class[] classes = new Class[superclasses.size()];
        superclasses.toArray(classes);
        return classes;
    }
111360
@Nullable
  @SafeVarargs
  public final TreePath findPathToEnclosing(Class<? extends Tree>... classes) {
    TreePath enclosingPath = getPath();
    while (enclosingPath != null) {
      for (Class<? extends Tree> clazz : classes) {
        if (clazz.isInstance(enclosingPath.getLeaf())) {
          return enclosingPath;
        }
      }
      enclosingPath = enclosingPath.getParentPath();
    }
    return null;
  }
927855
def get_class_list(cls) -> DOMTokenList:
        """"""
        cl = []
        cl.append(DOMTokenList(cls, cls.class_))
        if cls.inherit_class:
            for base_cls in cls.__bases__:
                if issubclass(base_cls, WdomElement):
                    cl.append(base_cls.get_class_list())
        # Reverse order so that parent's class comes to front  <- why?
        cl.reverse()
        return DOMTokenList(cls, *cl)
277471
def all_subclasses(cls):
    """"""
    for s in cls.__subclasses__():
      yield s
      for c in s.all_subclasses():
        yield c
426574
public static Symbol.ClassSymbol getOutermostClassSymbol(Symbol symbol) {
    // get the symbol for the outermost enclosing class.  this handles
    // the case of anonymous classes
    Symbol.ClassSymbol outermostClassSymbol = ASTHelpers.enclosingClass(symbol);
    while (outermostClassSymbol.getNestingKind().isNested()) {
      Symbol.ClassSymbol enclosingSymbol = ASTHelpers.enclosingClass(outermostClassSymbol.owner);
      if (enclosingSymbol != null) {
        outermostClassSymbol = enclosingSymbol;
      } else {
        // enclosingSymbol can be null in weird cases like for array methods
        break;
      }
    }
    return outermostClassSymbol;
  }
910311
public static Set<Class<?>> getAllSuperTypes(final Class<?> cls) {
        final Set<Class<?>> superTypesFound = new LinkedHashSet<>();

        getAllSuperTypes(cls, superTypesFound);

        return superTypesFound;
    }
925548
public ClassInfoList getStandardClasses() {
        return filter(new ClassInfoFilter() {
            @Override
            public boolean accept(final ClassInfo ci) {
                return ci.isStandardClass();
            }
        });
    }
1010556
protected function getClassesToScan()
    {
        $classes = [];

        foreach ($this->scan as $class) {
            try {
                $classes[] = new ReflectionClass($class);
            } catch (ReflectionException $e) {
                //
            }
        }

        return $classes;
    }