Package org.jboss.byteman.check

Examples of org.jboss.byteman.check.RuleCheck


            getLog().warn(e);
        } catch (MalformedURLException e) {
            getLog().warn(e);
        }

        RuleCheck checker = new RuleCheck();
        for(File script : scripts) {
            if(verbose) {
                getLog().info("add script " + script);
            }else {
                getLog().debug("add script " + script);
            }
            checker.addRuleFile(script.getAbsolutePath());
        }

        for(int i = 0; i < packages.length; i++) {
            checker.addPackage(packages[i]);
            if(verbose) {
                getLog().info("add package " + packages[i]);
            }else {
                getLog().debug("add package " + packages[i]);
            }
        }
        getLog().info("Checking " + scripts.size() + " byteman scripts in " + scriptDir);
        checker.checkRules();
        RuleCheckResult result= checker.getResult();
        if(result.hasWarning()) {
            List<String> warns = result.getWarningMessages();
            warns.addAll(result.getTypeWarningMessages());
            for(String warn : warns) {
                getLog().warn(warn);
View Full Code Here


        super(TestRuleCheck.class.getCanonicalName());
    }

    public void test()
    {
        RuleCheck checker = new RuleCheck();
        addBtmScript(checker, new File("src/test/resources/scripts"));
        checker.addPackage("org.jboss.byteman.tests.auxiliary");
        checker.addPackage("org.jboss.byteman.tests.bugfixes");
        checker.addPackage("org.jboss.byteman.tests.javaops");
        checker.addPackage("org.jboss.byteman.tests.helpertests");
        checker.checkRules();
        RuleCheckResult result= checker.getResult();
        if(result.hasError() || result.hasWarning()) {
            List<String> errors = result.getErrorMessages();
            for(String error : errors) {
                System.out.println(error);
            }
View Full Code Here

TOP

Related Classes of org.jboss.byteman.check.RuleCheck

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.