001// Copyright 2004, 2005 The Apache Software Foundation
002//
003// Licensed under the Apache License, Version 2.0 (the "License");
004// you may not use this file except in compliance with the License.
005// You may obtain a copy of the License at
006//
007//     http://www.apache.org/licenses/LICENSE-2.0
008//
009// Unless required by applicable law or agreed to in writing, software
010// distributed under the License is distributed on an "AS IS" BASIS,
011// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012// See the License for the specific language governing permissions and
013// limitations under the License.
014
015package org.apache.hivemind.service;
016
017/**
018 * Service used when dynamically creating new classes.
019 * 
020 * @author Howard Lewis Ship
021 */
022public interface ClassFactory
023{
024    /**
025     * Creates a {@link ClassFab} object for the given name; the new class is a subclass of the
026     * indicated class. The new class is public and concrete.
027     * <p>
028     * <b>Incompatible change from 1.0: The module parameter has been removed. </b>
029     * 
030     * @param name
031     *            the full qualified name of the class to create
032     * @param superClass
033     *            the parent class, which is often java.lang.Object
034     */
035
036    public ClassFab newClass(String name, Class superClass);
037
038    /**
039     * Creates a new {@link org.apache.hivemind.service.InterfaceFab} object with the given name.
040     * 
041     * @since 1.1
042     */
043
044    public InterfaceFab newInterface(String name);
045}