protected static void checkStaticIndexes ( SourceRange sourceRange , Operation ... operations ) throws SyntaxException { for ( int i = 0 ; i < operations . length ; i ++ ) { if ( operations [ i ] instanceof Element ) { try { TermFactory . create ( ( Element ) operations [ i ] ) ; } catch ( EvaluationException ee ) { throw SyntaxException . create ( sourceRange , MSG_INVALID_TERM , i ) ; } } } }
Ensure that any constant indexes in the operation list are valid terms .