Package context

Source Code of context.Manager

package context;

import manager.ManagerInterface;
import manager.IllegalParameterException;

/**
* Created by IntelliJ IDEA.
* User: saturn
* Date: 2003-9-30
* Time: 13:38:50
* To change this template use Options | File Templates.
*/
public class Manager implements ManagerInterface {

    //constant section
    public static final String CONTEXT = "context";

    //end

    protected Manager() {
    }

    public static ManagerInterface getInstance() {
        return new Manager();
    }

    protected final ContextImp context = new ContextImp();

    public Context getContext() {
        return context;
    }

    public Object getInstance(String name, Class type)
            throws IllegalParameterException {
        if (CONTEXT.equals(name) && (type.equals(Context.class))) {
            return new ContextImp();
        } else
            throw new IllegalParameterException("IllegalParameterException");
    }

}
TOP

Related Classes of context.Manager

TOP
Copyright © 2018 www.massapi.com. 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.