Deprecate passing a class to CapabilityManager::register (#4574)

This commit is contained in:
Joseph C. Sible authored and LexManos committed 2017-12-16 17:01:04 -08:00
1 parent 622c17ff04
commit 14a7d66024
5 files changed
+9 -5

No files matched your search

@@ -49,7 +49,11 @@ public enum CapabilityManager
* @param type The Interface to be registered
* @param storage A default implementation of the storage handler.
* @param implementation A default implementation of the interface.
* @deprecated Use the overload that takes a factory instead of a class.
* You can easily do this by passing a constructor reference
* (MyImpl::new instead of MyImpl.class). TODO remove in 1.13.
*/
@Deprecated
public <T> void register(Class<T> type, Capability.IStorage<T> storage, final Class<? extends T> implementation)
{
Preconditions.checkArgument(implementation != null, "Attempted to register a capability with no default implementation");
@@ -173,4 +177,4 @@ public enum CapabilityManager
}
}
}
}
}