4. Looking up an Updater.
- By Mike Mannion
- March 14, 2000
Listing 4. Looking up an Updater.
public Updater getUpdater(Object target)
{ return getUpdaterForClass(target.getClass());
}
public Updater getUpdaterForClass(Class targetClass)
{ if (updaters.containsKey(targetClass))
{ return (Updater)updaters.get(targetClass);
}
return getUpdaterForClass(targetClass.getSuperclass());
}