return context.getType(beanName);
}
public ObjectCreator createServiceCreator(ServiceBuilderResources resources)
{
return new ObjectCreator()
{
public Object createObject()
{
return getBean();
}
};
}
public String getServiceId()
{
return beanName;
}
public Class getServiceInterface()
{
return getBeanType();
}
public String getServiceScope()
{
return IOCConstants.DEFAULT_SCOPE;
}
public boolean isEagerLoad()
{
return false;
}
/** Returns an empty set, Spring has no concept of a marker annotation. */
public Set<Class> getMarkers()
{
return Collections.emptySet();
}
};
serviceDefs.put(beanName, serviceDef);
}
// And add one service that is the Spring WebApplicationContext.
ServiceDef serviceDef = new ServiceDef()
{
public ObjectCreator createServiceCreator(ServiceBuilderResources resources)
{
return new ObjectCreator()
{
public Object createObject()
{
return context;
}