KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > xml > xmlc > XMLCFactory


1 /*
2  * Enhydra Java Application Server Project
3  *
4  * The contents of this file are subject to the Enhydra Public License
5  * Version 1.1 (the "License"); you may not use this file except in
6  * compliance with the License. You may obtain a copy of the License on
7  * the Enhydra web site ( http://www.enhydra.org/ ).
8  *
9  * Software distributed under the License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11  * the License for the specific terms governing rights and limitations
12  * under the License.
13  *
14  * The Initial Developer of the Enhydra Application Server is Lutris
15  * Technologies, Inc. The Enhydra Application Server and portions created
16  * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
17  * All Rights Reserved.
18  *
19  * Contributor(s):
20  *
21  * $Id: XMLCFactory.java,v 1.1.1.1 2003/03/10 16:36:19 taweili Exp $
22  */

23
24 package org.enhydra.xml.xmlc;
25
26 /**
27  * Interface for factories for instances of XMLC generated classes.
28  */

29 public interface XMLCFactory {
30     /**
31      * Create an instance of a XMLC-generated class or a class derived
32      * from one, given the name of the class.
33      * <P>
34      * The class must have a constructor that takes a single boolean argument
35      * that will disable the immediate build of the DOM if false. XMLC
36      * creates such a constructor in the classes it generates.
37      *
38      * @param xmlcClassName The name of the XMLC class or derived class.
39      * @return The new object.
40      * @see #create(Class)
41      */

42     public XMLObject create(String JavaDoc xmlcClassName);
43
44     /**
45      * Create an instance of a XMLC-generated class or a class derived
46      * from one, given either a class or an interface object.
47      * <P>
48      * If a class is given, then it should be either the XMLC generated class
49      * or a class derived from it. This is useful for factories that create
50      * the given class then preform some operation with it, such as automatic
51      * recompilation.
52      * <P>
53      * If an interface is given, it is converted to the implementation name
54      * by appending "Impl" to the name. In this case, the implementation
55      * must be in the same package.
56      * <P>
57      * The class must have a constructor that takes a single boolean argument
58      * that will disable the immediate build of the DOM if false. XMLC
59      * creates such a constructor in the classes it generates.
60      *
61      * @param xmlcBasedClass The Class object for the class or interface.
62      * @return The new object.
63      */

64     public XMLObject create(Class JavaDoc xmlcBasedClass);
65 }
66
Popular Tags