Visits the entire class hierarchy from {@code subClass} to {@code Object}.

@param visitor  the visitor to use, must not be {@code null}.
@param subClass the class whose hierarchy is to be visited, must not be {@code null}.
481572
public static void visitClassHierarchy(ClassVisitor visitor, Class<?> subClass) {
        Class<?> visitedClass = subClass;
        while (visitedClass.getSuperclass() != null) {
            visitor.visit(visitedClass);
            visitedClass = visitedClass.getSuperclass();
        }
    }
1091789
private void exploreClass(Class<?>  clazzToAdd) throws IntrospectionException{
		List<InnerPropertyDescriptor> classList=getProperties(clazzToAdd);
	
		for (InnerPropertyDescriptor descriptor:classList){
			map.put(descriptor.getName(),descriptor);
		}
			
		this.list.addAll(classList);

		Class<?>  superClazz=clazzToAdd.getSuperclass();
		if (superClazz !=null){
			exploreClass(superClazz);
		}
	}
364146
public static void visitPostOrder(Node node, Visitor visitor) {
    visitPostOrder(node, visitor, Predicates.alwaysTrue());
  }
130091
private void traverseClass(Node classNode, Scope scope) {
    checkArgument(classNode.isClass());
    if (NodeUtil.isClassDeclaration(classNode)) {
      traverseClassDeclaration(classNode, scope);
    } else {
      traverseClassExpression(classNode, scope);
    }
  }
1310399
@Nonnull
    public BugInstance addClassAndMethod(PreorderVisitor visitor) {
        addClass(visitor);
        XMethod m = visitor.getXMethod();
        addMethod(visitor);
        if (!MemberUtils.isUserGenerated(m)) {
            foundInAutogeneratedMethod();
        }
        return this;
    }
488672
public ClassNode visitPublicTreeNodes($.Visitor<ClassNode> visitor) {
        return visitTree($.guardedVisitor(new $.Predicate<ClassNode>() {
            @Override
            public boolean test(ClassNode classNode) {
                return classNode.isPublic();
            }
        }, visitor));
    }
1028077
public void walk(Object root, Class[] skip, Visitor visitor)
    {
        Deque stack = new LinkedList();
        stack.add(root);

        while (!stack.isEmpty())
        {
            Object current = stack.removeFirst();

            if (current == null || _objVisited.containsKey(current))
            {
                continue;
            }

            final Class clazz = current.getClass();
            ClassInfo classInfo = getClassInfo(clazz, skip);
            if (classInfo._skip)
            {  // Do not process any classes that are assignableFrom the skip classes list.
                continue;
            }

            _objVisited.put(current, null);
            visitor.process(current);

            if (clazz.isArray())
            {
                int len = Array.getLength(current);
                Class compType = clazz.getComponentType();

                if (!compType.isPrimitive())
                {   // Speed up: do not walk primitives
                    ClassInfo info = getClassInfo(compType, skip);
                    if (!info._skip)
                    {   // Do not walk array elements of a class type that is to be skipped.
                        for (int i=0; i < len; i++)
                        {
                            Object element = Array.get(current, i);
                            if (element != null)
                            {   // Skip processing null array elements
                                stack.add(Array.get(current, i));
                            }
                        }
                    }
                }
            }
            else
            {   // Process fields of an object instance
                if (current instanceof Collection)
                {
                    walkCollection(stack, (Collection) current);
                }
                else if (current instanceof Map)
                {
                    walkMap(stack, (Map) current);
                }
                else
                {
                    walkFields(stack, current, skip);
                }
            }
        }
    }
1012430
@Nonnull
    public BugInstance addClass(PreorderVisitor visitor) {
        String className = visitor.getDottedClassName();
        addClass(className);
        return this;
    }
299711
@Override
    public void visit(final int version, final int access, final String name,
            final String signature, final String superName,
            final String[] interfaces) {
        computeSVUID = (access & Opcodes.ACC_INTERFACE) == 0;

        if (computeSVUID) {
            this.name = name;
            this.access = access;
            this.interfaces = new String[interfaces.length];
            System.arraycopy(interfaces, 0, this.interfaces, 0,
                    interfaces.length);
        }

        super.visit(version, access, name, signature, superName, interfaces);
    }
854081
@Override
    public Object visit(ParseTree tree) {
        if (!asBoolean(tree)) {
            return null;
        }

        return super.visit(tree);
    }
667369
public void visit(Visitor visitor) {
        for (Map.Entry<String, NodeT> item : nodeTable.entrySet()) {
            if (!visited.contains(item.getKey())) {
                this.dfs(visitor, item.getValue());
            }
        }
        visited.clear();
        time = 0;
        entryTime.clear();
        exitTime.clear();
        parent.clear();
        processed.clear();
    }
317116
public static JavaClassAndMethod visitSuperClassMethods(JavaClassAndMethod method, JavaClassAndMethodChooser chooser)
            throws ClassNotFoundException {
        return findMethod(method.getJavaClass().getSuperClasses(), method.getMethod().getName(), method.getMethod()
                .getSignature(), chooser);
    }
645611
@Nonnull
    public BugInstance addSuperclass(PreorderVisitor visitor) {
        String className = ClassName.toDottedClassName(visitor.getSuperclassName());
        addClass(className);
        return this;
    }
335545
@Override
    public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
        this.classInternalName = name;
        this.isInterface = (access & Opcodes.ACC_INTERFACE) != 0;
        this.isSynthetic = (access & Opcodes.ACC_SYNTHETIC) != 0;

        super.visit(version, access, name, signature, superName, interfaces);
    }
292667
@Override
	public void accept(Visitor<OptimizerNode> visitor) {
		if (visitor.preVisit(this)) {
			if (this.input1 == null || this.input2 == null) {
				throw new CompilerException();
			}
			
			getFirstPredecessorNode().accept(visitor);
			getSecondPredecessorNode().accept(visitor);
			
			for (DagConnection connection : getBroadcastConnections()) {
				connection.getSource().accept(visitor);
			}
			
			visitor.postVisit(this);
		}
	}
91515
public ClassNode visitAnnotatedClasses($.Visitor<ClassNode> visitor) {
        for (ClassNode annotated : this.annotated) {
            visitor.apply(annotated);
        }
        return this;
    }
25183
@Override
	public void traverse(SchemaVisitor visitor) {
    	visitor.initialize(m_xsdpackageName, m_targetNamespace,m_classes);
    	for (Map.Entry<String,ObjectDescriptor> entry: m_elements.entrySet()) {
    		ObjectDescriptor objectDescriptor = entry.getValue();
    		// get the type and call the visitor for it.
    		objectDescriptor.traverse(visitor);
    	}
    	visitor.terminate();
    }