Package org.apache.tools.ant.taskdefs.condition

Examples of org.apache.tools.ant.taskdefs.condition.Condition


        }
        if (property == null) {
            throw new BuildException("The property attribute is required.");
        }
       
        Condition c = (Condition) getConditions().nextElement();
        if (c.eval()) {
            log("Condition true; setting "+property+" to "+value,
                Project.MSG_DEBUG);
            getProject().setNewProperty(property, value);
        } else {
            log("Condition false; not setting "+property,
View Full Code Here


        }
        if (property == null) {
            throw new BuildException("The property attribute is required.");
        }

        Condition c = (Condition) getConditions().nextElement();
        if (c.eval()) {
            log("Condition true; setting " + property + " to " + value,
                Project.MSG_DEBUG);
            getProject().setNewProperty(property, value);
        } else {
            log("Condition false; not setting " + property,
View Full Code Here

        }
        if (countConditions() < 1) {
            throw new BuildException("You must nest a condition into "
                                     + "<waitfor>");
        }
        Condition c = (Condition) getConditions().nextElement();

        long savedMaxWaitMillis = maxWaitMillis;
        long savedCheckEveryMillis = checkEveryMillis;
        try {
            maxWaitMillis *= maxWaitMultiplier;
            checkEveryMillis *= checkEveryMultiplier;
            long start = System.currentTimeMillis();
            long end = start + maxWaitMillis;

            while (System.currentTimeMillis() < end) {
                if (c.eval()) {
                    return;
                }
                try {
                    Thread.sleep(checkEveryMillis);
                } catch (InterruptedException e) {
View Full Code Here

            throw new MoxieException("You must not nest more than one condition into <if>");
        }
        if (countConditions() < 1) {
            throw new MoxieException("You must nest a condition into <if>");
        }
        Condition c = (Condition) getConditions().nextElement();
        if (c.eval()) {
            if (thenTasks != null) {
                thenTasks.execute();
            }
        }
        else
View Full Code Here

                throw new MoxieException("You must not nest more than one condition into <elseif>");
            }
            if (countConditions() < 1) {
                throw new MoxieException("You must nest a condition into <elseif>");
            }
            Condition c = (Condition) getConditions().nextElement();

            return c.eval();
        }
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.taskdefs.condition.Condition

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.