Transforms the list of expressions, and checks that all transformed expressions have the given type.

@return a new list of transformed expressions
764909
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;
    }
1371811
public static <T, R> List<R> buildNewList(Collection<T> collection,
            Function<T, R> transformFunction) {
        return collection.stream().map(transformFunction)
                .collect(Collectors.toList());
    }
645952
public List<JSTypeExpression> getImplementedInterfaces() {
    if (info == null || info.implementedInterfaces == null) {
      return ImmutableList.of();
    }
    return Collections.unmodifiableList(info.implementedInterfaces);
  }
438583
@SuppressWarnings("unchecked")
    public static <T> SimpleExpression<T> list(Class<T> clazz, SimpleExpression<?>... exprs) {
        SimpleExpression<T> rv = (SimpleExpression<T>) exprs[0];
        for (int i = 1; i < exprs.length; i++) {
            rv = new SimpleOperation<T>(clazz, Ops.LIST, rv, exprs[i]);
        }
        return rv;
    }
461845
public static List<TriggerDto> transformToDto(List<Trigger> triggers) {
        List<TriggerDto> result = new ArrayList<TriggerDto>();

        for (Trigger trigger : triggers) {
            result.add(transformToDto(trigger));
        }
        return result;
    }
1239782
public static TypePredicate isExactTypeAny(Iterable<String> types) {
    return new ExactAny(Iterables.transform(types, GET_TYPE));
  }
246433
public static Expression logicalOr(List<? extends Expression> expressions) {
    return doShortCircuitingLogicalOperator(ImmutableList.copyOf(expressions), true);
  }
997681
@Nonnull
    public ImmutableList<T> toList() {
        return this.foldAbelian((v, acc) -> acc.cons(v), ImmutableList.empty());
    }
764116
static final Parser<Expression> castOrExpression(Parser<Expression> expr) {
    Parser<Expression> explicitCast =
        Parsers.sequence(paren(TypeLiteralParser.TYPE_LITERAL), expr, CastExpression::new);
    return explicitCast.or(paren(expr));
  }
714038
private static SQLTransform getTransform(TypeName typeName) {
		if (typeName.isPrimitive()) {
			return getPrimitiveTransform(typeName);
		}

		if (typeName instanceof ArrayTypeName) {
			ArrayTypeName typeNameArray = (ArrayTypeName) typeName;
			TypeName componentTypeName = typeNameArray.componentType;

			if (TypeUtility.isEquals(componentTypeName, Byte.TYPE.toString())) {
				return new ByteArraySQLTransform();
			} else {
				return new ArraySQLTransform();
			}
		} else if (typeName instanceof ParameterizedTypeName) {
			ParameterizedTypeName parameterizedTypeName = (ParameterizedTypeName) typeName;
			if (TypeUtility.isList(parameterizedTypeName)) {
				return new ListSQLTransformation();
			} else if (TypeUtility.isSet(parameterizedTypeName)) {
				return new SetSQLTransformation();
			} else if (TypeUtility.isMap(parameterizedTypeName)) {
				return new MapSQLTransformation();
			}
		}

		String name = typeName.toString();

		if (name.startsWith("java.lang")) {
			return getLanguageTransform(typeName);
		}

		if (name.startsWith("java.util")) {
			return getUtilTransform(typeName);
		}

		if (name.startsWith("java.math")) {
			return getMathTransform(typeName);
		}

		if (name.startsWith("java.net")) {
			return getNetTransform(typeName);
		}

		if (name.startsWith("java.sql")) {
			return getSqlTransform(typeName);
		}

		if (TypeUtility.isEnum(typeName)) {
			return new EnumSQLTransform(typeName);
		}

		return new ObjectSQLTransform();
	}
377522
protected ExpressionList<T> peekExprList() {

    if (textMode) {
      // return the current text expression list
      return _peekText();
    }

    if (whereStack == null) {
      whereStack = new ArrayStack<>();
      whereStack.push(query.where());
    }
    // return the current expression list
    return whereStack.peek();
  }
417904
private List<GroovyExpression> expandOrs(GroovyExpression expr, OptimizationContext context) {

        if (GremlinQueryOptimizer.isOrExpression(expr)) {
            return expandOrFunction(expr, context);
        }
        return processOtherExpression(expr, context);
    }
390119
@NonNull
  public RequestCreator transform(@NonNull List<? extends Transformation> transformations) {
    data.transform(transformations);
    return this;
  }
214167
public List<Type> constructorGenericTypes() {
        return constructorGenerics.isEmpty()
                ? Collections.<Type>emptyList() : new ArrayList<Type>(constructorGenerics.values());
    }
799456
public final java.util.List<String> expressionList() throws RecognitionException {
		java.util.List<String> exprs = null;


		ParserRuleReturnScope f =null;
		ParserRuleReturnScope s =null;

		 exprs = new java.util.ArrayList<String>();
		try {
			// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:725:3: (f= expression ( COMMA s= expression )* )
			// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:725:7: f= expression ( COMMA s= expression )*
			{
			pushFollow(FOLLOW_expression_in_expressionList4553);
			f=expression();
			state._fsp--;
			if (state.failed) return exprs;
			if ( state.backtracking==0 ) { exprs.add( (f!=null?input.toString(f.start,f.stop):null) ); }
			// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:726:7: ( COMMA s= expression )*
			loop96:
			while (true) {
				int alt96=2;
				int LA96_0 = input.LA(1);
				if ( (LA96_0==COMMA) ) {
					alt96=1;
				}

				switch (alt96) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:726:8: COMMA s= expression
					{
					match(input,COMMA,FOLLOW_COMMA_in_expressionList4564); if (state.failed) return exprs;
					pushFollow(FOLLOW_expression_in_expressionList4568);
					s=expression();
					state._fsp--;
					if (state.failed) return exprs;
					if ( state.backtracking==0 ) { exprs.add( (s!=null?input.toString(s.start,s.stop):null) ); }
					}
					break;

				default :
					break loop96;
				}
			}

			}

		}

		catch (RecognitionException re) {
		    throw re;
		}

		finally {
			// do for sure before leaving
		}
		return exprs;
	}
1299886
public List<JSTypeExpression> getExtendedInterfaces() {
    if (info == null || info.extendedInterfaces == null) {
      return ImmutableList.of();
    }
    return Collections.unmodifiableList(info.extendedInterfaces);
  }
522660
public static <E> RegularExpression<E> compile(List<Expression<E>> expressions) {
        return new RegularExpression<E>(expressions);
    }