1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package net.sf.morph.transform;
17
18 /**
19 * A <code>Transformer</code> that explicitly states which of its source
20 * classes are transformable to which destination classes. In most cases, you
21 * can implicitly assume that a <code>Transformer</code> can transform all
22 * sources to all destinations. However, if the <code>Transformer</code>
23 * implements this interface, that is not the case.
24 *
25 * @author Matt Sgarlata
26 * @since Nov 26, 2004
27 */
28 public interface ExplicitTransformer {
29
30 /**
31 * Specifies which source classes are transformable to which destination
32 * classes.
33 *
34 * @param destinationType
35 * the destination type to test
36 * @param sourceType
37 * the source type to test
38 * @return whether the destination type is transformable to the source
39 * type
40 * @throws TransformationException
41 * if it could not be determined if <code>sourceType</code>
42 * is transformable into <code>destinationType</code>
43 */
44 public boolean isTransformable(Class destinationType, Class sourceType)
45 throws TransformationException;
46
47 }