1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.clazz;
17
18 /***
19 * An object resposible for allocating new <b>instances</b> of a Clazz.
20 *
21 * @author <a href="mailto:dmitri@apache.org">Dmitri Plotnikov</a>
22 * @version $Id: ClazzInstanceFactory.java,v 1.3 2004/02/19 23:58:37 scolebourne Exp $
23 */
24 public interface ClazzInstanceFactory extends ClazzFeature {
25
26 /***
27 * Creates a new instance.
28 * @param parameters is the list of parameters. It can be null if the
29 * factory takes no parameters.
30 */
31 Object newInstance(Object[] parameters);
32
33 /***
34 * Returns the name of the factory. May be null.
35 */
36 String getName();
37
38 /***
39 * Returns the factory parameter types.
40 */
41 Clazz[] getParameterClazzes();
42
43 /***
44 * Returns the signature of the factory in the format
45 * "factoryName(paramType1,...)", where "factoryName" may be empty.
46 */
47 String getSignature();
48 }