protected <T extends Expression>List<T> transformExpressions(List<? extends Expression> expressions,ExpressionTransformer transformer,Class<T> transformedType){
  List<T> list=new ArrayList<T>(expressions.size());
  for (  Expression expr : expressions) {
    Expression transformed=transformer.transform(expr);
    if (!transformedType.isInstance(transformed))     throw new GroovyBugError(String.format("Transformed expression should have type %s but has type %s",transformedType,transformed.getClass()));
    list.add(transformedType.cast(transformed));
  }
  return list;
}

protected < T extends Expression > List < T > transformExpressions ( List < ? extends Expression > expressions , ExpressionTransformer transformer , Class < T > transformedType ) { List < T > list = new ArrayList < T > ( expressions . size ( ) ) ; for ( Expression expr : expressions ) { Expression transformed = transformer . transform ( expr ) ; if ( ! transformedType . isInstance ( transformed ) ) throw new GroovyBugError ( String . format ( "Transformed expression should have type %s but has type %s" , transformedType , transformed . getClass ( ) ) ) ; list . add ( transformedType . cast ( transformed ) ) ; } return list ; }
transforms the list of expressions , and checks that all transformed expressions have the given type .
