Class BlockTemplate

All Implemented Interfaces:

public abstract class BlockTemplate extends Template<>
Template representing a sequence of consecutive statements.
Author: (Louis Wasserman)
See Also:
  • Constructor Details

    • BlockTemplate

      public BlockTemplate()
  • Method Details

    • create

      public static BlockTemplate create(UStatement... templateStatements)
    • create

      public static BlockTemplate create(Map<String,? extends UType> expressionArgumentTypes, UStatement... templateStatements)
    • create

      public static BlockTemplate create(Iterable<UTypeVar> typeVariables, Map<String,? extends UType> expressionArgumentTypes, UStatement... templateStatements)
    • create

      public static BlockTemplate create(<Annotation> annotations, Iterable<UTypeVar> typeVariables, Map<String,? extends UType> expressionArgumentTypes, Iterable<? extends UStatement> templateStatements)
    • withStatements

      public BlockTemplate withStatements(Iterable<? extends UStatement> templateStatements)
    • match

      public Iterable<> match( tree, 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<>
    • replace

      public Fix replace( match)
      Specified by:
      replace in class Template<>