alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

package org.netbeans.modules.tasklist.bugs;

import org.netbeans.modules.tasklist.bugs.issuezilla.IZBugEngine;
import org.netbeans.modules.tasklist.bugs.bugzilla.BZBugEngine;
import org.netbeans.modules.tasklist.bugs.javanet.JavaNetEngine;

/**
 * TODO document
 * 
 * @author Petr Kuzel
 */
public final class BugEngines {

    static String IZ = "Issuezilla";

    static String BZ = "Bugzilla";

    // it has fixed URL, same Sf.net etc
    static String JAVA_NET = "Java.net";

    static String[] list() {
        return new String[] {IZ, BZ, JAVA_NET};
    }

    static BugEngine get(String id) {
        if (IZ.equals(id)) {
            return new IZBugEngine();
        } else if (BZ.equals(id)) {
            return new BZBugEngine();
        } else if (JAVA_NET.equals(id)) {
            return new JavaNetEngine();
        } else {
            assert false : "Invalid id " + id;
            return null;
        }
    }

}
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.