Class UVariableDecl

java.lang.Object
com.sun.source.util.SimpleTreeVisitor<Choice<Unifier>, Unifier>
com.google.errorprone.refaster.UTree<com.sun.tools.javac.tree.JCTree.JCStatement>
com.google.errorprone.refaster.UVariableDecl
All Implemented Interfaces:
com.google.common.base.Function<UStatement.UnifierWithUnconsumedStatements, Choice<UStatement.UnifierWithUnconsumedStatements>>, Unifiable<Tree>, UStatement, StatementTree, Tree, TreeVisitor<Choice<Unifier>, Unifier>, VariableTree, Serializable, Function<UStatement.UnifierWithUnconsumedStatements, Choice<UStatement.UnifierWithUnconsumedStatements>>

public abstract class UVariableDecl extends UTree<com.sun.tools.javac.tree.JCTree.JCStatement> implements VariableTree
A UTree representation of a local variable declaration.

A UVariableDecl can be unified with any variable declaration which has a matching type and initializer. Annotations and modifiers are preserved for the corresponding replacement, as well as the variable name. ULocalVarIdent instances are used to represent references to local variables.

As a result, we can modify variable declarations and initializations in target code while preserving variable names and other contextual information.

Author:
lowasser@google.com (Louis Wasserman)
See Also: