Re: Custom annotations lost on abstract methods on a page class
Hi I solved the fragile part in this way that I don't care if the class is enhanced or not, my only aim is to check whether the needed annotation can be somewhere found in the hierarchy. I solved it with a recursive call for |* <http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html#getSuperclass%28%29>*getSuperclass() until it returns null. Perhaps it is not the best, but for sure the annotation won't be overseen. Robert | Karthik N schrieb: Hi Robert, Yes, that's what we are doing right now! We're going up the hiearchy. The fragile part is the way we implement it to figure how to identify a Tapestry enhanced base page. !page.getSimpleName().startsWith("$") Is there are better way? Thanks. -- Forwarded message -- From: Robert Binna <[EMAIL PROTECTED]> Date: Aug 26, 2006 2:42 AM Subject: Re: Custom annotations lost on abstract methods on a page class To: Tapestry users Hi I know this problem. I think it has to do with the Javassist enhancement. A solution to get the information of the annotation at runtime is to walk up the class hierarchy and ask each superclass for the declared methods that correspond the abstract method and get its annotations. As far as I've found out, that works. Kind regards, Robert Karthik N schrieb: Hi, I'm trying to use custom annotations on tapestry abstract methods of a page class After tapestry creates the enhanced class for these abstract methods, the annotations are lost. The annotations are however honored on methods with an implementation. I'm wondering is this annotations not carried over for abstract methods deliberate, or can I request this to be an enhancement feature, or can I supply some other "hints" to tapestry to make it work? Thanks, Karthik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom annotations lost on abstract methods on a page class
Hi Robert, Yes, that's what we are doing right now! We're going up the hiearchy. The fragile part is the way we implement it to figure how to identify a Tapestry enhanced base page. !page.getSimpleName().startsWith("$") Is there are better way? Thanks. -- Forwarded message -- From: Robert Binna <[EMAIL PROTECTED]> Date: Aug 26, 2006 2:42 AM Subject: Re: Custom annotations lost on abstract methods on a page class To: Tapestry users Hi I know this problem. I think it has to do with the Javassist enhancement. A solution to get the information of the annotation at runtime is to walk up the class hierarchy and ask each superclass for the declared methods that correspond the abstract method and get its annotations. As far as I've found out, that works. Kind regards, Robert Karthik N schrieb: Hi, I'm trying to use custom annotations on tapestry abstract methods of a page class After tapestry creates the enhanced class for these abstract methods, the annotations are lost. The annotations are however honored on methods with an implementation. I'm wondering is this annotations not carried over for abstract methods deliberate, or can I request this to be an enhancement feature, or can I supply some other "hints" to tapestry to make it work? Thanks, Karthik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks, Karthik
Re: Custom annotations lost on abstract methods on a page class
Hi I know this problem. I think it has to do with the Javassist enhancement. A solution to get the information of the annotation at runtime is to walk up the class hierarchy and ask each superclass for the declared methods that correspond the abstract method and get its annotations. As far as I've found out, that works. Kind regards, Robert Karthik N schrieb: Hi, I'm trying to use custom annotations on tapestry abstract methods of a page class After tapestry creates the enhanced class for these abstract methods, the annotations are lost. The annotations are however honored on methods with an implementation. I'm wondering is this annotations not carried over for abstract methods deliberate, or can I request this to be an enhancement feature, or can I supply some other "hints" to tapestry to make it work? Thanks, Karthik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]