Home / Class/ VariableTree Class — spring-boot Architecture

VariableTree Class — spring-boot Architecture

Architecture documentation for the VariableTree class in VariableTree.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/VariableTree.java lines 29–57

class VariableTree extends ReflectionWrapper {

	VariableTree(Object instance) {
		super("com.sun.source.tree.VariableTree", instance);
	}

	String getName() throws Exception {
		return findMethod("getName").invoke(getInstance()).toString();
	}

	String getType() throws Exception {
		return findMethod("getType").invoke(getInstance()).toString();
	}

	ExpressionTree getInitializer() throws Exception {
		Object instance = findMethod("getInitializer").invoke(getInstance());
		return (instance != null) ? new ExpressionTree(instance) : null;
	}

	@SuppressWarnings("unchecked")
	Set<Modifier> getModifierFlags() throws Exception {
		Object modifiers = findMethod("getModifiers").invoke(getInstance());
		if (modifiers == null) {
			return Collections.emptySet();
		}
		return (Set<Modifier>) findMethod(findClass("com.sun.source.tree.ModifiersTree"), "getFlags").invoke(modifiers);
	}

}

Analyze Your Own Codebase

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

Try Supermodel Free