Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
InstanceGenerator |
|
| 0.0;0 |
1 | package nl.beesting.beangenerator.generator; | |
2 | ||
3 | import nl.beesting.beangenerator.TypeNotSupportedException; | |
4 | import nl.beesting.beangenerator.util.ParameterPair; | |
5 | ||
6 | public interface InstanceGenerator { | |
7 | /** | |
8 | * Initializes the instnce generator with the given array of objects. | |
9 | * @param initParams | |
10 | */ | |
11 | public void init(ParameterPair[] initParams); | |
12 | ||
13 | /** | |
14 | * Create an instance for the given class. The returned object is of the given class. | |
15 | * @param type | |
16 | * @return | |
17 | * @throws nl.beesting.beangenerator.TypeNotSupportedException | |
18 | */ | |
19 | public Object generateInstance(Class<?> type) throws TypeNotSupportedException; | |
20 | ||
21 | /** | |
22 | * Create an instance for the given class with an instance generator specific modus. The returned object is of the given | |
23 | * class. | |
24 | * @param type | |
25 | * @param modus | |
26 | * @return | |
27 | * @throws nl.beesting.beangenerator.TypeNotSupportedException | |
28 | */ | |
29 | public Object generateInstance(Class<?> type, int modus) throws TypeNotSupportedException; | |
30 | ||
31 | } |