Class BlockTemplate

  • All Implemented Interfaces:
    Serializable

    public abstract class BlockTemplate
    extends Template<com.google.errorprone.refaster.BlockTemplateMatch>
    Template representing a sequence of consecutive statements.
    Author:
    [email protected] (Louis Wasserman)
    See Also:
    Serialized Form
    • Constructor Detail

      • BlockTemplate

        public BlockTemplate()
    • Method Detail

      • match

        public Iterable<com.google.errorprone.refaster.BlockTemplateMatch> match​(com.sun.tools.javac.tree.JCTree tree,
                                                                                 com.sun.tools.javac.util.Context context)
        If the tree is a JCTree.JCBlock, returns a list of disjoint matches corresponding to the exact list of template statements found consecutively; otherwise, returns an empty list.
        Specified by:
        match in class Template<com.google.errorprone.refaster.BlockTemplateMatch>
      • replace

        public Fix replace​(com.google.errorprone.refaster.BlockTemplateMatch match)
        Specified by:
        replace in class Template<com.google.errorprone.refaster.BlockTemplateMatch>