Logo
Distributed Genetic Programming Framework
print print

File org.jfree.base.BootableProjectInfo.java

Here you can find all the information about the file org.jfree.base.BootableProjectInfo.java. You may explore it here or download it onto your local disk.
/* ========================================================================
 * JCommon : a free general purpose class library for the Java(tm) platform
 * ========================================================================
 *
 * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors.
 * 
 * Project Info:  http://www.jfree.org/jcommon/index.html
 *
 * This library is free software; you can redistribute it and/or modify it 
 * under the terms of the GNU Lesser General Public License as published by 
 * the Free Software Foundation; either version 2.1 of the License, or 
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but 
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 
 * License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
 * USA.  
 *
 * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 
 * in the United States and other countries.]
 * 
 * ------------------------
 * BootableProjectInfo.java
 * ------------------------
 * (C)opyright 2004, by Thomas Morgner and Contributors.
 *
 * Original Author:  Thomas Morgner;
 * Contributor(s):   David Gilbert (for Object Refinery Limited);
 *
 * $Id: BootableProjectInfo.java,v 1.4 2006/03/23 19:47:05 taqua Exp $
 *
 * Changes
 * -------
 * 07-Jun-2004 : Added source headers (DG);
 *
 */


package org.jfree.base;

import java.util.ArrayList;

/**
 * Project info for a bootable project. A bootable project provides a controlled
 * way of initalizing all subsystems by providing a Boot loader implementation.
 *
 * @author Thomas Morgner
 */

public class BootableProjectInfo extends BasicProjectInfo {

    /** The boot class. */
    private String bootClass;

    /** The auto-boot flag. */
    private boolean autoBoot;

    /**
     * Creates a new instance.
     */

    public BootableProjectInfo() {
        this.autoBoot = true;
    }

    /**
     * Creates a new library reference.
     *
     * @param name    the name.
     * @param version the version.
     * @param licence the licence.
     * @param info    the web address or other info.
     */

    public BootableProjectInfo(final String name, final String version,
                               final String licence, final String info) {
        this();
        setName(name);
        setVersion(version);
        setLicenceName(licence);
        setInfo(info);
    }

    /**
     * Creates a new library reference.
     *
     * @param name    the name.
     * @param version the version.
     * @param info  the info (for example, the project URL).
     * @param copyright  the copyright statement.
     * @param licenceName the license name.
     */

    public BootableProjectInfo(final String name, final String version, final String info,
                               final String copyright, final String licenceName) {
        this();
        setName(name);
        setVersion(version);
        setLicenceName(licenceName);
        setInfo(info);
        setCopyright(copyright);
    }

    /**
     * Returns the dependencies.
     * 
     * @return The dependencies.
     */

    public BootableProjectInfo[] getDependencies() {
        final ArrayList dependencies = new ArrayList();
        final Library[] libraries = getLibraries();
        for (int i = 0; i < libraries.length; i++) {
          Library lib = libraries[i];
          if (lib instanceof BootableProjectInfo) {
              dependencies.add(lib);
          }
        }

        final Library[] optionalLibraries = getOptionalLibraries();
        for (int i = 0; i < optionalLibraries.length; i++) {
          Library lib = optionalLibraries[i];
          if (lib instanceof BootableProjectInfo) {
              dependencies.add(lib);
          }
        }
        return (BootableProjectInfo[]) dependencies.toArray
            (new BootableProjectInfo[dependencies.size()]);
    }

    /**
     * Adds a dependency.
     * 
     * @param projectInfo  the project.
     * @deprecated use 'addLibrary' instead.
     */

    public void addDependency(final BootableProjectInfo projectInfo) {
        if (projectInfo == null) {
            throw new NullPointerException();
        }
        addLibrary(projectInfo);
    }

    /**
     * Returns the name of the boot class.
     * 
     * @return The name of the boot class.
     */

    public String getBootClass() {
        return this.bootClass;
    }

    /**
     * Sets the boot class name.
     * 
     * @param bootClass  the boot class name.
     */

    public void setBootClass(final String bootClass) {
        this.bootClass = bootClass;
    }

    /**
     * Returns, whether the project should be booted automaticly.
     * 
     * @return The auto-boot flag.
     */

    public boolean isAutoBoot() {
        return this.autoBoot;
    }

    /**
     * Sets the auto boot flag.
     *
     * @param autoBoot true, if the project should be booted automaticly, false otherwise.
     */

    public void setAutoBoot(final boolean autoBoot) {
        this.autoBoot = autoBoot;
    }

}

File Information:

file name:BootableProjectInfo.java
package:org.jfree.base
qualified name:org.jfree.base.BootableProjectInfo.java
file type:Java Source File
download location:download http://dgpf.sourceforge.net/source/org/jfree/base/BootableProjectInfo.java
size:5.398 KB (5528 B)
uploaded: 2015-07-22 04:11:00 GMT+0000
last update: 2006-09-26 10:30:32 GMT+0000
last access: 2017-11-18 21:28:33 GMT+0000

statistics online since 2006-01-02.   RSS Feed
Contact us by sending an email to tweise@gmx.de to receive further information, to report errors, or to join our project.
All content on this site (http://dgpf.sourceforge.net/) is LGPL-licensed.
http://dgpf.sourceforge.net/scripts/source/source.php last modified at 2015-07-22 04:10:53 GMT+0000 served at 2017-11-18 21:28:33 GMT+0000.
Valid CSS Valid XHTML 1.1
Valid RSS SourceForge.net Logo