KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > util > Coercible


1 /***************************************
2  * *
3  * JBoss: The OpenSource J2EE WebOS *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  ***************************************/

9
10 package org.jboss.util;
11
12 /**
13  * An iterface which an object implements to indicate that it will handle
14  * coercion by itself.
15  *
16  * @version <tt>$Revision: 1.1 $</tt>
17  * @author <a HREF="mailto:jason@planet57.com">Jason Dillon</a>
18  */

19 public interface Coercible
20 {
21    /**
22     * Coerce this object into a specified type
23     *
24     * @param type Type to coerce to
25     * @return Coereced object
26     *
27     * @exception CoercionException Failed to coerce
28     */

29    Object JavaDoc coerce(Class JavaDoc type) throws CoercionException;
30 }
31
Popular Tags