private void prepareIndexExpression(String indexedExpression) throws IndexInvalidException { List indexedExprs = this.compiler.compileProjectionAttributes(indexedExpression); if (indexedExprs == null || indexedExprs.size() != 1) { throw new IndexInvalidException( String.format("Invalid indexed expressoion : ' %s '", indexedExpression)); } CompiledValue expr = (CompiledValue) ((Object[]) indexedExprs.get(0))[1]; if (expr.getType() == CompiledValue.LITERAL) throw new IndexInvalidException( String.format("Invalid indexed expressoion : ' %s '", indexedExpression)); try { StringBuilder sb = new StringBuilder(); expr.generateCanonicalizedExpression(sb, context); this.indexedExpression = sb.toString(); } catch (Exception e) { throw new IndexInvalidException( String.format("Invalid indexed expressoion : ' %s ' %s", new Object[] {indexedExpression, e.getMessage()})); } }