Package org.codehaus.groovy.ast.stmt

Examples of org.codehaus.groovy.ast.stmt.ThrowStatement


    private Statement checkFinalArgNotOverridden(ClassNode cNode, FieldNode fNode) {
        final String name = fNode.getName();
        Expression value = findArg(name);
        return ifS(
                notX(equalsNullX(value)),
                new ThrowStatement(ctorX(READONLYEXCEPTION_TYPE,
                        args(constX(name), constX(cNode.getName()))
                )));
    }
View Full Code Here


        }
    }

    private static BlockStatement illegalArgumentBlock(String message) {
        return block(
                new ThrowStatement(ctorX(make(IllegalArgumentException.class), args(constX(message)))));
    }
View Full Code Here

                    mv.visitLabel(dflt);
                }
            });
            ConstantExpression text = new ConstantExpression("invalid index for closure");
            ConstructorCallExpression cce = new ConstructorCallExpression(ClassHelper.make(IllegalArgumentException.class), text);
            ThrowStatement ts = new ThrowStatement(cce);
            instructions.add(ts);
        }

        // return
        instructions.add(new BytecodeInstruction() {
View Full Code Here

TOP

Related Classes of org.codehaus.groovy.ast.stmt.ThrowStatement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.