01: package org.jicarilla.container;
02:
03: /**
04: * Exception that is thrown when an {@link Adapter} or {@link Factory}
05: * cannot create an instance because there is no public constructor available.
06: * This usually indicates a mistake made during assembly.
07: *
08: * @author <a href="lsimons at jicarilla dot org">Leo Simons</a>
09: * @version $Id: NoPublicConstructorAvailableException.java,v 1.6 2004/02/29 19:21:35 lsimons Exp $
10: */
11: public class NoPublicConstructorAvailableException extends
12: JicarillaInstantiationException {
13: /** The class that has no public constructor. */
14: protected final Class m_problematicClass;
15:
16: /**
17: * Creates a new instance identifying the specified class as the problem.
18: *
19: * @param clazz the class that has no public constructor.
20: */
21: public NoPublicConstructorAvailableException(final Class clazz) {
22: super (clazz.getName() + "has no public constructors!");
23: m_problematicClass = clazz;
24: }
25:
26: /**
27: * Retrieve the class that has no public constructor.
28: *
29: * @return
30: */
31: public Class getProblematicClass() {
32: return m_problematicClass;
33: }
34: }
|