@ SuppressWarnings ( "rawtypes" ) public static Collection transformToCollectionObject ( final ExpressionEngine engine , final String collectionName , final Map < String , Object > context ) { Object collectionObject = engine . evaluate ( collectionName , context ) ; if ( ! ( collectionObject instanceof Collection ) ) { throw new EvaluationException ( collectionName + " expression is not a collection" ) ; } return ( Collection ) collectionObject ; }
Transform to collection object .