⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 project.java

📁 Use the links below to download a source distribution of Ant from one of our mirrors. It is good pra
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
     * @param coreLoader The classloader to use for the project.     *                   May be <code>null</code>.     */    public void setCoreLoader(ClassLoader coreLoader) {        this.coreLoader = coreLoader;    }    /**     * Return the core classloader to use for this project.     * This may be <code>null</code>, indicating that     * the parent classloader should be used.     *     * @return the core classloader to use for this project.     *     */    public ClassLoader getCoreLoader() {        return coreLoader;    }    /**     * Add a build listener to the list. This listener will     * be notified of build events for this project.     *     * @param listener The listener to add to the list.     *                 Must not be <code>null</code>.     */    public synchronized void addBuildListener(BuildListener listener) {        // If the listeners already has this listener, do nothing        if (listeners.contains(listener)) {            return;        }        // create a new Vector to avoid ConcurrentModificationExc when        // the listeners get added/removed while we are in fire        Vector newListeners = getBuildListeners();        newListeners.addElement(listener);        listeners = newListeners;    }    /**     * Remove a build listener from the list. This listener     * will no longer be notified of build events for this project.     *     * @param listener The listener to remove from the list.     *                 Should not be <code>null</code>.     */    public synchronized void removeBuildListener(BuildListener listener) {        // create a new Vector to avoid ConcurrentModificationExc when        // the listeners get added/removed while we are in fire        Vector newListeners = getBuildListeners();        newListeners.removeElement(listener);        listeners = newListeners;    }    /**     * Return a copy of the list of build listeners for the project.     *     * @return a list of build listeners for the project     */    public Vector getBuildListeners() {        return (Vector) listeners.clone();    }    /**     * Write a message to the log with the default log level     * of MSG_INFO .     * @param message The text to log. Should not be <code>null</code>.     */    public void log(String message) {        log(message, MSG_INFO);    }    /**     * Write a project level message to the log with the given log level.     * @param message The text to log. Should not be <code>null</code>.     * @param msgLevel The log priority level to use.     */    public void log(String message, int msgLevel) {        log(message, null, msgLevel);    }    /**     * Write a project level message to the log with the given log level.     * @param message The text to log. Should not be <code>null</code>.     * @param throwable The exception causing this log, may be <code>null</code>.     * @param msgLevel The log priority level to use.     * @since 1.7     */    public void log(String message, Throwable throwable, int msgLevel) {        fireMessageLogged(this, message, throwable, msgLevel);    }    /**     * Write a task level message to the log with the given log level.     * @param task The task to use in the log. Must not be <code>null</code>.     * @param message The text to log. Should not be <code>null</code>.     * @param msgLevel The log priority level to use.     */    public void log(Task task, String message, int msgLevel) {        fireMessageLogged(task, message, null, msgLevel);    }    /**     * Write a task level message to the log with the given log level.     * @param task The task to use in the log. Must not be <code>null</code>.     * @param message The text to log. Should not be <code>null</code>.     * @param throwable The exception causing this log, may be <code>null</code>.     * @param msgLevel The log priority level to use.     * @since 1.7     */    public void log(Task task, String message, Throwable throwable, int msgLevel) {        fireMessageLogged(task, message, throwable, msgLevel);    }    /**     * Write a target level message to the log with the given log level.     * @param target The target to use in the log.     *               Must not be <code>null</code>.     * @param message The text to log. Should not be <code>null</code>.     * @param msgLevel The log priority level to use.     */    public void log(Target target, String message, int msgLevel) {        log(target, message, null, msgLevel);    }    /**     * Write a target level message to the log with the given log level.     * @param target The target to use in the log.     *               Must not be <code>null</code>.     * @param message The text to log. Should not be <code>null</code>.     * @param throwable The exception causing this log, may be <code>null</code>.     * @param msgLevel The log priority level to use.     * @since 1.7     */    public void log(Target target, String message, Throwable throwable,            int msgLevel) {        fireMessageLogged(target, message, throwable, msgLevel);    }    /**     * Return the set of global filters.     *     * @return the set of global filters.     */    public FilterSet getGlobalFilterSet() {        return globalFilterSet;    }    /**     * Set a property. Any existing property of the same name     * is overwritten, unless it is a user property.     * @param name The name of property to set.     *             Must not be <code>null</code>.     * @param value The new value of the property.     *              Must not be <code>null</code>.     */    public void setProperty(String name, String value) {        PropertyHelper.getPropertyHelper(this).                setProperty(null, name, value, true);    }    /**     * Set a property if no value currently exists. If the property     * exists already, a message is logged and the method returns with     * no other effect.     *     * @param name The name of property to set.     *             Must not be <code>null</code>.     * @param value The new value of the property.     *              Must not be <code>null</code>.     * @since 1.5     */    public void setNewProperty(String name, String value) {        PropertyHelper.getPropertyHelper(this).setNewProperty(null, name,                                                              value);    }    /**     * Set a user property, which cannot be overwritten by     * set/unset property calls. Any previous value is overwritten.     * @param name The name of property to set.     *             Must not be <code>null</code>.     * @param value The new value of the property.     *              Must not be <code>null</code>.     * @see #setProperty(String,String)     */    public void setUserProperty(String name, String value) {        PropertyHelper.getPropertyHelper(this).setUserProperty(null, name,                                                               value);    }    /**     * Set a user property, which cannot be overwritten by set/unset     * property calls. Any previous value is overwritten. Also marks     * these properties as properties that have not come from the     * command line.     *     * @param name The name of property to set.     *             Must not be <code>null</code>.     * @param value The new value of the property.     *              Must not be <code>null</code>.     * @see #setProperty(String,String)     */    public void setInheritedProperty(String name, String value) {        PropertyHelper ph = PropertyHelper.getPropertyHelper(this);        ph.setInheritedProperty(null, name, value);    }    /**     * Set a property unless it is already defined as a user property     * (in which case the method returns silently).     *     * @param name The name of the property.     *             Must not be <code>null</code>.     * @param value The property value. Must not be <code>null</code>.     */    private void setPropertyInternal(String name, String value) {        PropertyHelper ph = PropertyHelper.getPropertyHelper(this);        ph.setProperty(null, name, value, false);    }    /**     * Return the value of a property, if it is set.     *     * @param propertyName The name of the property.     *             May be <code>null</code>, in which case     *             the return value is also <code>null</code>.     * @return the property value, or <code>null</code> for no match     *         or if a <code>null</code> name is provided.     */    public String getProperty(String propertyName) {        PropertyHelper ph = PropertyHelper.getPropertyHelper(this);        return (String) ph.getProperty(null, propertyName);    }    /**     * Replace ${} style constructions in the given value with the     * string value of the corresponding data types.     *     * @param value The string to be scanned for property references.     *              May be <code>null</code>.     *     * @return the given string with embedded property names replaced     *         by values, or <code>null</code> if the given string is     *         <code>null</code>.     *     * @exception BuildException if the given value has an unclosed     *                           property name, e.g. <code>${xxx</code>.     */    public String replaceProperties(String value)        throws BuildException {        PropertyHelper ph = PropertyHelper.getPropertyHelper(this);        return ph.replaceProperties(null, value, null);    }    /**     * Return the value of a user property, if it is set.     *     * @param propertyName The name of the property.     *             May be <code>null</code>, in which case     *             the return value is also <code>null</code>.     * @return the property value, or <code>null</code> for no match     *         or if a <code>null</code> name is provided.     */     public String getUserProperty(String propertyName) {        PropertyHelper ph = PropertyHelper.getPropertyHelper(this);        return (String) ph.getUserProperty(null, propertyName);    }    /**     * Return a copy of the properties table.     * @return a hashtable containing all properties     *         (including user properties).     */    public Hashtable getProperties() {        PropertyHelper ph = PropertyHelper.getPropertyHelper(this);        return ph.getProperties();    }    /**     * Return a copy of the user property hashtable.     * @return a hashtable containing just the user properties.     */    public Hashtable getUserProperties() {        PropertyHelper ph = PropertyHelper.getPropertyHelper(this);        return ph.getUserProperties();    }    /**     * Copy all user properties that have been set on the command     * line or a GUI tool from this instance to the Project instance     * given as the argument.     *     * <p>To copy all &quot;user&quot; properties, you will also have to call     * {@link #copyInheritedProperties copyInheritedProperties}.</p>     *     * @param other the project to copy the properties to.  Must not be null.     *     * @since Ant 1.5     */    public void copyUserProperties(Project other) {        PropertyHelper ph = PropertyHelper.getPropertyHelper(this);        ph.copyUserProperties(other);    }    /**     * Copy all user properties that have not been set on the     * command line or a GUI tool from this instance to the Project     * instance given as the argument.     *     * <p>To copy all &quot;user&quot; properties, you will also have to call     * {@link #copyUserProperties copyUserProperties}.</p>     *     * @param other the project to copy the properties to.  Must not be null.     *     * @since Ant 1.5     */    public void copyInheritedProperties(Project other) {        PropertyHelper ph = PropertyHelper.getPropertyHelper(this);        ph.copyInheritedProperties(other);    }    /**     * Set the default target of the project.     *     * @param defaultTarget The name of the default target for this project.     *                      May be <code>null</code>, indicating that there is     *                      no default target.     *     * @deprecated since 1.5.x.     *             Use setDefault.     * @see #setDefault(String)     */    public void setDefaultTarget(String defaultTarget) {        this.defaultTarget = defaultTarget;    }    /**     * Return the name of the default target of the project.     * @return name of the default target or     *         <code>null</code> if no default has been set.     */    public String getDefaultTarget() {        return defaultTarget;    }    /**     * Set the default target of the project.     *     * @param defaultTarget The name of the default target for this project.     *                      May be <code>null</code>, indicating that there is     *                      no default target.     */    public void setDefault(String defaultTarget) {        this.defaultTarget = defaultTarget;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -