Go AVDN
Extending Example

Extending the MetaBundle hierarchy to honor Java class inheritance is fairly easy.

Have a looke at tutor/meta/InheritingBundles.java, if a MetaBundle is get from the

public static MetaBundle getInheritingMetaBundle(Class<?> klass)
method, then before consulting ancestor bundles, it'll first try MetaBundles associated with the super classes of the given class when required metadata doesn't present at that MetaBundle.

The implementation is rather simple, in fact just 4 lines of code:

public static MetaBundle getInheritingMetaBundle(Class<?> klass)
{
   MetaBundle b = MetaBundle.get(klass);
      for (Class<?> c = klass; c != null; c = c.getSuperclass())
   b.addNearSuperBundle(MetaBundle.get(c));
   return b;
}