Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* Factory for GNSS Support implementations.
* Implementations have to register to this factory.
*
*/
package org.etsi.adapter;
/**
* Factory for Test Execution Required implementations.
* Implementations have to register to this factory.
*/
public class GnssSupportFactory {
/**
* Registered IGnssSupport implementation
*/
private static IGnssSupport instance;
/**
* Gets the registered IGnssSupport implementation
* @return Instance of IGnssSupport implementation registered through setImpl() or null
* @see setImpl
*/
public static IGnssSupport getInstance() {
return instance;
}
/**
* Private constructor (Singleton pattern)
*/
private GnssSupportFactory() {
//empty
}
/**
* Sets the implementation instance to be returned by the factory
* @param impl Instance of the implementation to be registered
*/
public static void setImpl(IGnssSupport impl) {
instance = impl;
}
}