// construct If criteria
ElementSymbol sy1 = new ElementSymbol("x"); //$NON-NLS-1$
List elmnts = new ArrayList(1);
elmnts.add(sy1);
CriteriaSelector cs = new CriteriaSelector(CriteriaSelector.LIKE, elmnts);
Criteria crit = new HasCriteria(cs);
Block elseblock = new Block();
elseblock.addStatement(cmdStmt);
IfStatement ifStmt = new IfStatement(crit, ifblock, elseblock);