Home / Class/ TreeVisitorInvocationHandler Class — spring-boot Architecture

TreeVisitorInvocationHandler Class — spring-boot Architecture

Architecture documentation for the TreeVisitorInvocationHandler class in Tree.java from the spring-boot codebase.

Entity Profile

Source Code

configuration-metadata/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/fieldvalues/javac/Tree.java lines 48–73

	private class TreeVisitorInvocationHandler implements InvocationHandler {

		private TreeVisitor treeVisitor;

		TreeVisitorInvocationHandler(TreeVisitor treeVisitor) {
			this.treeVisitor = treeVisitor;
		}

		@Override
		@SuppressWarnings("rawtypes")
		public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
			if (method.getName().equals("visitClass") && (Integer) args[1] == 0) {
				Iterable members = (Iterable) Tree.this.getClassTreeMembers.invoke(args[0]);
				for (Object member : members) {
					if (member != null) {
						Tree.this.acceptMethod.invoke(member, proxy, ((Integer) args[1]) + 1);
					}
				}
			}
			if (method.getName().equals("visitVariable")) {
				this.treeVisitor.visitVariable(new VariableTree(args[0]));
			}
			return null;
		}

	}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free