Class UTemplater

java.lang.Object
com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
com.google.errorprone.refaster.UTemplater
All Implemented Interfaces:
com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>

public class UTemplater extends com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
Converts a type-checked syntax tree to a portable UTree template.
Author:
lowasser@google.com (Louis Wasserman)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.sun.tools.javac.util.Context.Key<Boolean>
    Context key to indicate that templates should be treated as BlockTemplates, regardless of their structure.

    Fields inherited from class com.sun.source.util.SimpleTreeVisitor

    DEFAULT_VALUE
  • Constructor Summary

    Constructors
    Constructor
    Description
    UTemplater(Map<String,com.sun.tools.javac.code.Symbol.VarSymbol> freeVariables, com.sun.tools.javac.util.Context context)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.google.common.collect.ImmutableClassToInstanceMap<Annotation>
    annotationMap(com.sun.tools.javac.code.Symbol symbol)
     
    static Template<?>
    createTemplate(com.sun.tools.javac.util.Context context, com.sun.source.tree.MethodTree decl)
    Returns a template based on a method.
    protected UTree<?>
    defaultAction(com.sun.source.tree.Tree tree, Void v)
     
    static com.google.common.collect.ImmutableMap<String,com.sun.tools.javac.code.Symbol.VarSymbol>
    freeExpressionVariables(com.sun.source.tree.MethodTree templateMethodDecl)
     
    template(com.sun.source.tree.ExpressionTree tree)
     
    template(com.sun.source.tree.StatementTree tree)
     
    com.sun.source.tree.Tree
    template(com.sun.source.tree.Tree tree)
     
    template(com.sun.tools.javac.code.Type type)
     
    templateType(com.sun.source.tree.Tree tree)
     
    com.google.errorprone.refaster.UAnnotatedType
    visitAnnotatedType(com.sun.source.tree.AnnotatedTypeTree tree, Void v)
     
    com.google.errorprone.refaster.UAnnotation
    visitAnnotation(com.sun.source.tree.AnnotationTree tree, Void v)
     
    com.google.errorprone.refaster.UArrayAccess
    visitArrayAccess(com.sun.source.tree.ArrayAccessTree tree, Void v)
     
    com.google.errorprone.refaster.UArrayTypeTree
    visitArrayType(com.sun.source.tree.ArrayTypeTree tree, Void v)
     
    com.google.errorprone.refaster.UAssert
    visitAssert(com.sun.source.tree.AssertTree tree, Void v)
     
    com.google.errorprone.refaster.UAssign
    visitAssignment(com.sun.source.tree.AssignmentTree tree, Void v)
     
    com.google.errorprone.refaster.UBinary
    visitBinary(com.sun.source.tree.BinaryTree tree, Void v)
     
    com.google.errorprone.refaster.UBlock
    visitBlock(com.sun.source.tree.BlockTree tree, Void v)
     
    com.google.errorprone.refaster.UBreak
    visitBreak(com.sun.source.tree.BreakTree tree, Void v)
     
    com.google.errorprone.refaster.UCatch
    visitCatch(com.sun.source.tree.CatchTree tree, Void v)
     
    com.google.errorprone.refaster.UClassDecl
    visitClass(com.sun.source.tree.ClassTree tree, Void v)
     
    com.google.errorprone.refaster.UAssignOp
    visitCompoundAssignment(com.sun.source.tree.CompoundAssignmentTree tree, Void v)
     
    visitConditionalExpression(com.sun.source.tree.ConditionalExpressionTree tree, Void v)
     
    com.google.errorprone.refaster.UContinue
    visitContinue(com.sun.source.tree.ContinueTree tree, Void v)
     
    com.google.errorprone.refaster.UDoWhileLoop
    visitDoWhileLoop(com.sun.source.tree.DoWhileLoopTree tree, Void v)
     
    com.google.errorprone.refaster.USkip
    visitEmptyStatement(com.sun.source.tree.EmptyStatementTree tree, Void v)
     
    com.google.errorprone.refaster.UEnhancedForLoop
    visitEnhancedForLoop(com.sun.source.tree.EnhancedForLoopTree tree, Void v)
     
    visitExpressionStatement(com.sun.source.tree.ExpressionStatementTree tree, Void v)
     
    com.google.errorprone.refaster.UForLoop
    visitForLoop(com.sun.source.tree.ForLoopTree tree, Void v)
     
    visitIdentifier(com.sun.source.tree.IdentifierTree tree, Void v)
     
    com.google.errorprone.refaster.UIf
    visitIf(com.sun.source.tree.IfTree tree, Void v)
     
    com.google.errorprone.refaster.UInstanceOf
    visitInstanceOf(com.sun.source.tree.InstanceOfTree tree, Void v)
     
    com.google.errorprone.refaster.UIntersectionType
    visitIntersectionType(com.sun.source.tree.IntersectionTypeTree tree, Void v)
     
    com.google.errorprone.refaster.ULabeledStatement
    visitLabeledStatement(com.sun.source.tree.LabeledStatementTree tree, Void v)
     
    com.google.errorprone.refaster.ULambda
    visitLambdaExpression(com.sun.source.tree.LambdaExpressionTree tree, Void v)
     
    visitLiteral(com.sun.source.tree.LiteralTree tree, Void v)
     
    com.google.errorprone.refaster.UMemberReference
    visitMemberReference(com.sun.source.tree.MemberReferenceTree tree, Void v)
     
    visitMemberSelect(com.sun.source.tree.MemberSelectTree tree, Void v)
     
    com.google.errorprone.refaster.UMethodDecl
    visitMethod(com.sun.source.tree.MethodTree decl, Void v)
     
    visitMethodInvocation(com.sun.source.tree.MethodInvocationTree tree, Void v)
     
    com.google.errorprone.refaster.UModifiers
    visitModifiers(com.sun.source.tree.ModifiersTree modifiers, Void v)
     
    com.google.errorprone.refaster.UNewArray
    visitNewArray(com.sun.source.tree.NewArrayTree tree, Void v)
     
    com.google.errorprone.refaster.UNewClass
    visitNewClass(com.sun.source.tree.NewClassTree tree, Void v)
     
    com.google.errorprone.refaster.UTypeApply
    visitParameterizedType(com.sun.source.tree.ParameterizedTypeTree tree, Void v)
     
    com.google.errorprone.refaster.UParens
    visitParenthesized(com.sun.source.tree.ParenthesizedTree tree, Void v)
     
    com.google.errorprone.refaster.UPrimitiveTypeTree
    visitPrimitiveType(com.sun.source.tree.PrimitiveTypeTree tree, Void v)
     
    visitReturn(com.sun.source.tree.ReturnTree tree, Void v)
     
    com.google.errorprone.refaster.USynchronized
    visitSynchronized(com.sun.source.tree.SynchronizedTree tree, Void v)
     
    com.google.errorprone.refaster.UThrow
    visitThrow(com.sun.source.tree.ThrowTree tree, Void v)
     
    com.google.errorprone.refaster.UTry
    visitTry(com.sun.source.tree.TryTree tree, Void v)
     
    com.google.errorprone.refaster.UTypeCast
    visitTypeCast(com.sun.source.tree.TypeCastTree tree, Void v)
     
    com.google.errorprone.refaster.UTypeParameter
    visitTypeParameter(com.sun.source.tree.TypeParameterTree tree, Void v)
     
    com.google.errorprone.refaster.UUnary
    visitUnary(com.sun.source.tree.UnaryTree tree, Void v)
     
    com.google.errorprone.refaster.UUnionType
    visitUnionType(com.sun.source.tree.UnionTypeTree tree, Void v)
     
    visitVariable(com.sun.source.tree.VariableTree tree, Void v)
     
    com.google.errorprone.refaster.UWhileLoop
    visitWhileLoop(com.sun.source.tree.WhileLoopTree tree, Void v)
     
    com.google.errorprone.refaster.UWildcard
    visitWildcard(com.sun.source.tree.WildcardTree tree, Void v)
     

    Methods inherited from class com.sun.source.util.SimpleTreeVisitor

    visit, visit, visitAnyPattern, visitBindingPattern, visitCase, visitCompilationUnit, visitConstantCaseLabel, visitDeconstructionPattern, visitDefaultCaseLabel, visitErroneous, visitExports, visitImport, visitModule, visitOpens, visitOther, visitPackage, visitPatternCaseLabel, visitProvides, visitRequires, visitSwitch, visitSwitchExpression, visitUses, visitYield

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • REQUIRE_BLOCK_KEY

      public static final com.sun.tools.javac.util.Context.Key<Boolean> REQUIRE_BLOCK_KEY
      Context key to indicate that templates should be treated as BlockTemplates, regardless of their structure.
  • Constructor Details

    • UTemplater

      public UTemplater(Map<String,com.sun.tools.javac.code.Symbol.VarSymbol> freeVariables, com.sun.tools.javac.util.Context context)
  • Method Details

    • createTemplate

      public static Template<?> createTemplate(com.sun.tools.javac.util.Context context, com.sun.source.tree.MethodTree decl)
      Returns a template based on a method. One-line methods starting with a return statement are guessed to be expression templates, and all other methods are guessed to be block templates.
    • freeExpressionVariables

      public static com.google.common.collect.ImmutableMap<String,com.sun.tools.javac.code.Symbol.VarSymbol> freeExpressionVariables(com.sun.source.tree.MethodTree templateMethodDecl)
    • template

      public com.sun.source.tree.Tree template(com.sun.source.tree.Tree tree)
    • visitMethod

      public com.google.errorprone.refaster.UMethodDecl visitMethod(com.sun.source.tree.MethodTree decl, Void v)
      Specified by:
      visitMethod in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitMethod in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitModifiers

      public com.google.errorprone.refaster.UModifiers visitModifiers(com.sun.source.tree.ModifiersTree modifiers, Void v)
      Specified by:
      visitModifiers in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitModifiers in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • template

      public UExpression template(com.sun.source.tree.ExpressionTree tree)
    • templateType

      public UExpression templateType(com.sun.source.tree.Tree tree)
    • visitInstanceOf

      public com.google.errorprone.refaster.UInstanceOf visitInstanceOf(com.sun.source.tree.InstanceOfTree tree, Void v)
      Specified by:
      visitInstanceOf in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitInstanceOf in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitPrimitiveType

      public com.google.errorprone.refaster.UPrimitiveTypeTree visitPrimitiveType(com.sun.source.tree.PrimitiveTypeTree tree, Void v)
      Specified by:
      visitPrimitiveType in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitPrimitiveType in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitLiteral

      public ULiteral visitLiteral(com.sun.source.tree.LiteralTree tree, Void v)
      Specified by:
      visitLiteral in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitLiteral in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitParenthesized

      public com.google.errorprone.refaster.UParens visitParenthesized(com.sun.source.tree.ParenthesizedTree tree, Void v)
      Specified by:
      visitParenthesized in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitParenthesized in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitAssignment

      public com.google.errorprone.refaster.UAssign visitAssignment(com.sun.source.tree.AssignmentTree tree, Void v)
      Specified by:
      visitAssignment in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitAssignment in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitArrayAccess

      public com.google.errorprone.refaster.UArrayAccess visitArrayAccess(com.sun.source.tree.ArrayAccessTree tree, Void v)
      Specified by:
      visitArrayAccess in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitArrayAccess in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitAnnotation

      public com.google.errorprone.refaster.UAnnotation visitAnnotation(com.sun.source.tree.AnnotationTree tree, Void v)
      Specified by:
      visitAnnotation in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitAnnotation in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitAnnotatedType

      public com.google.errorprone.refaster.UAnnotatedType visitAnnotatedType(com.sun.source.tree.AnnotatedTypeTree tree, Void v)
      Specified by:
      visitAnnotatedType in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitAnnotatedType in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitMemberSelect

      public UExpression visitMemberSelect(com.sun.source.tree.MemberSelectTree tree, Void v)
      Specified by:
      visitMemberSelect in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitMemberSelect in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitMethodInvocation

      public UExpression visitMethodInvocation(com.sun.source.tree.MethodInvocationTree tree, Void v)
      Specified by:
      visitMethodInvocation in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitMethodInvocation in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitBinary

      public com.google.errorprone.refaster.UBinary visitBinary(com.sun.source.tree.BinaryTree tree, Void v)
      Specified by:
      visitBinary in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitBinary in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitCompoundAssignment

      public com.google.errorprone.refaster.UAssignOp visitCompoundAssignment(com.sun.source.tree.CompoundAssignmentTree tree, Void v)
      Specified by:
      visitCompoundAssignment in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitCompoundAssignment in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitUnary

      public com.google.errorprone.refaster.UUnary visitUnary(com.sun.source.tree.UnaryTree tree, Void v)
      Specified by:
      visitUnary in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitUnary in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitConditionalExpression

      public UExpression visitConditionalExpression(com.sun.source.tree.ConditionalExpressionTree tree, Void v)
      Specified by:
      visitConditionalExpression in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitConditionalExpression in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitNewArray

      public com.google.errorprone.refaster.UNewArray visitNewArray(com.sun.source.tree.NewArrayTree tree, Void v)
      Specified by:
      visitNewArray in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitNewArray in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitNewClass

      public com.google.errorprone.refaster.UNewClass visitNewClass(com.sun.source.tree.NewClassTree tree, Void v)
      Specified by:
      visitNewClass in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitNewClass in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitClass

      public com.google.errorprone.refaster.UClassDecl visitClass(com.sun.source.tree.ClassTree tree, Void v)
      Specified by:
      visitClass in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitClass in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitArrayType

      public com.google.errorprone.refaster.UArrayTypeTree visitArrayType(com.sun.source.tree.ArrayTypeTree tree, Void v)
      Specified by:
      visitArrayType in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitArrayType in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitParameterizedType

      public com.google.errorprone.refaster.UTypeApply visitParameterizedType(com.sun.source.tree.ParameterizedTypeTree tree, Void v)
      Specified by:
      visitParameterizedType in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitParameterizedType in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitUnionType

      public com.google.errorprone.refaster.UUnionType visitUnionType(com.sun.source.tree.UnionTypeTree tree, Void v)
      Specified by:
      visitUnionType in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitUnionType in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitWildcard

      public com.google.errorprone.refaster.UWildcard visitWildcard(com.sun.source.tree.WildcardTree tree, Void v)
      Specified by:
      visitWildcard in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitWildcard in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitIntersectionType

      public com.google.errorprone.refaster.UIntersectionType visitIntersectionType(com.sun.source.tree.IntersectionTypeTree tree, Void v)
      Specified by:
      visitIntersectionType in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitIntersectionType in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitTypeParameter

      public com.google.errorprone.refaster.UTypeParameter visitTypeParameter(com.sun.source.tree.TypeParameterTree tree, Void v)
      Specified by:
      visitTypeParameter in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitTypeParameter in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitTypeCast

      public com.google.errorprone.refaster.UTypeCast visitTypeCast(com.sun.source.tree.TypeCastTree tree, Void v)
      Specified by:
      visitTypeCast in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitTypeCast in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitLambdaExpression

      public com.google.errorprone.refaster.ULambda visitLambdaExpression(com.sun.source.tree.LambdaExpressionTree tree, Void v)
      Specified by:
      visitLambdaExpression in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitLambdaExpression in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitMemberReference

      public com.google.errorprone.refaster.UMemberReference visitMemberReference(com.sun.source.tree.MemberReferenceTree tree, Void v)
      Specified by:
      visitMemberReference in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitMemberReference in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitIdentifier

      public UExpression visitIdentifier(com.sun.source.tree.IdentifierTree tree, Void v)
      Specified by:
      visitIdentifier in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitIdentifier in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • template

      public UStatement template(com.sun.source.tree.StatementTree tree)
    • visitTry

      public com.google.errorprone.refaster.UTry visitTry(com.sun.source.tree.TryTree tree, Void v)
      Specified by:
      visitTry in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitTry in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitCatch

      public com.google.errorprone.refaster.UCatch visitCatch(com.sun.source.tree.CatchTree tree, Void v)
      Specified by:
      visitCatch in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitCatch in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitExpressionStatement

      public UStatement visitExpressionStatement(com.sun.source.tree.ExpressionStatementTree tree, Void v)
      Specified by:
      visitExpressionStatement in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitExpressionStatement in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitReturn

      public UStatement visitReturn(com.sun.source.tree.ReturnTree tree, Void v)
      Specified by:
      visitReturn in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitReturn in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitWhileLoop

      public com.google.errorprone.refaster.UWhileLoop visitWhileLoop(com.sun.source.tree.WhileLoopTree tree, Void v)
      Specified by:
      visitWhileLoop in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitWhileLoop in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitVariable

      public UVariableDecl visitVariable(com.sun.source.tree.VariableTree tree, Void v)
      Specified by:
      visitVariable in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitVariable in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitEmptyStatement

      public com.google.errorprone.refaster.USkip visitEmptyStatement(com.sun.source.tree.EmptyStatementTree tree, Void v)
      Specified by:
      visitEmptyStatement in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitEmptyStatement in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitForLoop

      public com.google.errorprone.refaster.UForLoop visitForLoop(com.sun.source.tree.ForLoopTree tree, Void v)
      Specified by:
      visitForLoop in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitForLoop in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitLabeledStatement

      public com.google.errorprone.refaster.ULabeledStatement visitLabeledStatement(com.sun.source.tree.LabeledStatementTree tree, Void v)
      Specified by:
      visitLabeledStatement in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitLabeledStatement in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitBreak

      public com.google.errorprone.refaster.UBreak visitBreak(com.sun.source.tree.BreakTree tree, Void v)
      Specified by:
      visitBreak in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitBreak in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitContinue

      public com.google.errorprone.refaster.UContinue visitContinue(com.sun.source.tree.ContinueTree tree, Void v)
      Specified by:
      visitContinue in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitContinue in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitBlock

      public com.google.errorprone.refaster.UBlock visitBlock(com.sun.source.tree.BlockTree tree, Void v)
      Specified by:
      visitBlock in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitBlock in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitThrow

      public com.google.errorprone.refaster.UThrow visitThrow(com.sun.source.tree.ThrowTree tree, Void v)
      Specified by:
      visitThrow in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitThrow in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitDoWhileLoop

      public com.google.errorprone.refaster.UDoWhileLoop visitDoWhileLoop(com.sun.source.tree.DoWhileLoopTree tree, Void v)
      Specified by:
      visitDoWhileLoop in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitDoWhileLoop in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitEnhancedForLoop

      public com.google.errorprone.refaster.UEnhancedForLoop visitEnhancedForLoop(com.sun.source.tree.EnhancedForLoopTree tree, Void v)
      Specified by:
      visitEnhancedForLoop in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitEnhancedForLoop in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitSynchronized

      public com.google.errorprone.refaster.USynchronized visitSynchronized(com.sun.source.tree.SynchronizedTree tree, Void v)
      Specified by:
      visitSynchronized in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitSynchronized in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitIf

      public com.google.errorprone.refaster.UIf visitIf(com.sun.source.tree.IfTree tree, Void v)
      Specified by:
      visitIf in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitIf in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • visitAssert

      public com.google.errorprone.refaster.UAssert visitAssert(com.sun.source.tree.AssertTree tree, Void v)
      Specified by:
      visitAssert in interface com.sun.source.tree.TreeVisitor<com.sun.source.tree.Tree,Void>
      Overrides:
      visitAssert in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • defaultAction

      protected UTree<?> defaultAction(com.sun.source.tree.Tree tree, Void v)
      Overrides:
      defaultAction in class com.sun.source.util.SimpleTreeVisitor<com.sun.source.tree.Tree,Void>
    • template

      public UType template(com.sun.tools.javac.code.Type type)
    • annotationMap

      public static com.google.common.collect.ImmutableClassToInstanceMap<Annotation> annotationMap(com.sun.tools.javac.code.Symbol symbol)