use of org.spongepowered.api.registry.util.RegistrationDependency in project SpongeCommon by SpongePowered.
the class SpongeGameRegistry method addToGraph.
private void addToGraph(RegistryModule module, DirectedGraph<Class<? extends RegistryModule>> graph) {
graph.add(module.getClass());
RegistrationDependency dependency = module.getClass().getAnnotation(RegistrationDependency.class);
if (dependency != null) {
for (Class<? extends RegistryModule> dependent : dependency.value()) {
graph.addEdge(checkNotNull(module.getClass(), "Dependency class was null!"), dependent);
}
}
}
use of org.spongepowered.api.registry.util.RegistrationDependency in project LanternServer by LanternPowered.
the class LanternGameRegistry method addToGraph.
private void addToGraph(RegistryModule module, DirectedGraph<Class<? extends RegistryModule>> graph) {
graph.add(module.getClass());
final RegistrationDependency dependency = module.getClass().getAnnotation(RegistrationDependency.class);
if (dependency != null) {
for (Class<? extends RegistryModule> dependent : dependency.value()) {
graph.addEdge(checkNotNull(module.getClass(), "Dependency class was null!"), dependent);
}
}
}
Aggregations