public static final Set<LiveResourceRegistration> snapshot() { ResourceProvider provider = Services.getResourceService().getResourceProvider(); Set<LiveResourceRegistration> data = Sets.newHashSet(); for (Class<? extends Listener> type : provider.types()) { for (Resource<?> resource : provider.forType(type)) { data.add(construct(type, resource.getName(), resource)); } } return data; }
public static final <L extends Listener> LiveResourceRegistration of( final Class<L> type, final Resource<? super L> resource) { return construct(type, resource.getName(), resource); }