Add DynamicItem for extension points with one implementation
Some extension points should only have one implementation provided, such as a provider of avatar images. In this case it doesn't make sense to have multiple providers. For this use-case we need DynamicItem. Change-Id: If5166c3f42c5619daea56d79dea8feb70f9ee084
This commit is contained in:

committed by
Shawn Pearce

parent
095a25143c
commit
ae984a98e2
@@ -236,7 +236,12 @@ class AutoRegisterModules {
|
||||
|
||||
if (rawType.getAnnotation(ExtensionPoint.class) != null) {
|
||||
TypeLiteral<?> tl = TypeLiteral.get(type);
|
||||
if (env.hasDynamicSet(tl)) {
|
||||
if (env.hasDynamicItem(tl)) {
|
||||
sysSingletons.add(clazz);
|
||||
sysListen.put(tl, clazz);
|
||||
httpGen.listen(tl, clazz);
|
||||
sshGen.listen(tl, clazz);
|
||||
} else if (env.hasDynamicSet(tl)) {
|
||||
sysSingletons.add(clazz);
|
||||
sysListen.put(tl, clazz);
|
||||
httpGen.listen(tl, clazz);
|
||||
|
Reference in New Issue
Block a user