Mercurial Hosting > nabble
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/nabble/modules/ad/AdModule.java Thu Mar 21 19:15:52 2019 -0600 @@ -0,0 +1,47 @@ +package nabble.modules.ad; + +import fschmidt.util.java.FutureValue; +import nabble.modules.ModuleManager; +import nabble.naml.compiler.Module; +import nabble.naml.compiler.Source; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Set; + + +public enum AdModule implements Module { + INSTANCE; + + private static final Iterable<Class> extensions = Arrays.asList(new Class[] { + BaseNamespaceExt.class, +// StripePayment.class, + }); + + private final FutureValue<Collection<Source>> sources = new FutureValue<Collection<Source>>() { + protected Collection<Source> compute() { + return ModuleManager.loadSource(AdModule.this); + } + }; + + public String getName() { + return "ad"; + } + + public Iterable<Class> getExtensions() { + return extensions; + } + + public Collection<Source> getSources() { + return sources.get(); + } + + public Set<String> getDependencies() { + return Collections.emptySet(); + } + + static { + Ad.init(); + } +}