// service that isn't returned by getCurrentServiceClasses(), which seems like a bug.
//
synchronized public Iterator getCurrentServiceClasses()
{
Set classSet = new HashSet();
BeanContextServices bcs = this;
while (bcs != null)
{
// Optimize the case where we can do a direct copy based upon impl knowledge.
if (bcs instanceof ControlBeanContext)
{
classSet.addAll(((ControlBeanContext)bcs).services.keySet());
}
else
{
Iterator iter = bcs.getCurrentServiceClasses();
while (iter.hasNext())
classSet.add(iter.next());
}
// Go up to the parent, if it is a service provider as well