view 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 source

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();
	}
}