Mercurial Hosting > nabble
comparison src/nabble/modules/ad/AdModule.java @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:7ecd1a4ef557 |
---|---|
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 } |