return null;
}
@SuppressWarnings("unchecked")
final Class<T> cls = (Class<T>)object.getClass();
Scope scope = cls.getAnnotation(Scope.class);
if (scope != null) {
if (scope.value() == ScopeType.SINGLETON) {
return LifecycleManagerUtils.createSingletonObjectFactory(object);
} else if (scope.value() == ScopeType.PROTOTYPE) {
// It's a prototype
return LifecycleManagerUtils.createPrototypeObjectFactory(cls);
}
}
// has no Scope annotation, do nothing