Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
AdapterTrader |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright (c) 2009, Ergon Informatik AG (http://www.ergon.ch) | |
3 | * All rights reserved. | |
4 | * | |
5 | * Licensed under the Open Permis License which accompanies this distribution, | |
6 | * and is available at http://www.openpermis.org/BSDlicenceKent.txt | |
7 | */ | |
8 | package org.openpermis.editor.policy.adapter; | |
9 | ||
10 | import org.openpermis.policy.bean.PartBean; | |
11 | ||
12 | ||
13 | /** | |
14 | * Describes an adapter trader that can adapt part beans. | |
15 | * @since 0.3.0 | |
16 | */ | |
17 | public interface AdapterTrader { | |
18 | ||
19 | ||
20 | //---- Methods | |
21 | ||
22 | /** | |
23 | * Adapts a part bean to the adaptee type. | |
24 | * @param part the part bean to adapt. | |
25 | * @param adapteeType the type to adapt to. | |
26 | * @since 0.3.0 | |
27 | */ | |
28 | public <T extends Adaptee<?>> T adaptTo (PartBean part, Class<T> adapteeType); | |
29 | ||
30 | ||
31 | } |