equal
deleted
inserted
replaced
41 * risk. This code and its internal interfaces are subject to change |
41 * risk. This code and its internal interfaces are subject to change |
42 * or deletion without notice.</b> |
42 * or deletion without notice.</b> |
43 */ |
43 */ |
44 public class ScannerFactory { |
44 public class ScannerFactory { |
45 /** The context key for the scanner factory. */ |
45 /** The context key for the scanner factory. */ |
46 public static final Context.Key<ScannerFactory> scannerFactoryKey = |
46 public static final Context.Key<ScannerFactory> scannerFactoryKey = new Context.Key<>(); |
47 new Context.Key<ScannerFactory>(); |
|
48 |
47 |
49 /** Get the Factory instance for this context. */ |
48 /** Get the Factory instance for this context. */ |
50 public static ScannerFactory instance(Context context) { |
49 public static ScannerFactory instance(Context context) { |
51 ScannerFactory instance = context.get(scannerFactoryKey); |
50 ScannerFactory instance = context.get(scannerFactoryKey); |
52 if (instance == null) |
51 if (instance == null) |