1
2
3
4
5
6
7
8
9
10
11
12
13
14 package net.sf.jgabl2.adapt;
15
16
17 /**
18 * Represents an object that is adaptable, that is,
19 * it can return an adapter of a requested type.
20 *
21 * @author Alexander Schwartz
22 * @since 0.5.0
23 */
24 public interface IGenericAdaptable {
25
26 /**
27 * Retrieves an adapter of the specified type <code>t</code>.
28 *
29 * @todo Can we get rid of the type parameter?
30 *
31 * @param <T> the type of the requested adapter
32 * @param clazz the type of the requested adapter
33 * @return an adapter of the requested type; may not be <code>null</code>
34 * @throws UnavailableAdapterException if and only if no such adapter is
35 * available
36 */
37 public <T> T getAdapter(Class<?> clazz)
38 throws UnavailableAdapterException;
39 }