0
|
1 package nabble.modules.ad;
|
|
2
|
|
3 import fschmidt.util.java.FutureValue;
|
|
4 import nabble.modules.ModuleManager;
|
|
5 import nabble.naml.compiler.Module;
|
|
6 import nabble.naml.compiler.Source;
|
|
7
|
|
8 import java.util.Arrays;
|
|
9 import java.util.Collection;
|
|
10 import java.util.Collections;
|
|
11 import java.util.Set;
|
|
12
|
|
13
|
|
14 public enum AdModule implements Module {
|
|
15 INSTANCE;
|
|
16
|
|
17 private static final Iterable<Class> extensions = Arrays.asList(new Class[] {
|
|
18 BaseNamespaceExt.class,
|
|
19 // StripePayment.class,
|
|
20 });
|
|
21
|
|
22 private final FutureValue<Collection<Source>> sources = new FutureValue<Collection<Source>>() {
|
|
23 protected Collection<Source> compute() {
|
|
24 return ModuleManager.loadSource(AdModule.this);
|
|
25 }
|
|
26 };
|
|
27
|
|
28 public String getName() {
|
|
29 return "ad";
|
|
30 }
|
|
31
|
|
32 public Iterable<Class> getExtensions() {
|
|
33 return extensions;
|
|
34 }
|
|
35
|
|
36 public Collection<Source> getSources() {
|
|
37 return sources.get();
|
|
38 }
|
|
39
|
|
40 public Set<String> getDependencies() {
|
|
41 return Collections.emptySet();
|
|
42 }
|
|
43
|
|
44 static {
|
|
45 Ad.init();
|
|
46 }
|
|
47 }
|