[jboss-dev-forums] [Design of JBossCache] - Re: Name change for PojoCache annotation

ben.wang@jboss.com do-not-reply at jboss.com
Wed Nov 15 03:00:39 EST 2006


"genman" wrote : For inheritence, it seems appropriate to add an attribute rather than a separate annotation, for example:
  | 
  | @Replicable(instanceOf=true)
  | or
  | @Replicable(subclasses=true)
  | 
  | There might be some sort of relation term that would fit better than "instanceof", that means "child classes also".
  | 

Idea of using attribute is very good but it won't work as is. If you look at jbosscache-aop.xml, you will see that the now @InstanceOfPojoCacheable tag is used inside the JBoss Aop prepare statement:

  |    <prepare expr="field(!static * $instanceof{@org.jboss.cache.pojo.annotation.InstanceOfPojoCacheable}->*)" />
  | 

So replace that with a generic annotation with additional attribute won't work.

"sub-class" in better than InstanceOf (I am following the JBoss Aop usage, as you can see here), but SubClassOfReplicable, e.g., seems wordy?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986033#3986033

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986033



More information about the jboss-dev-forums mailing list