|
Re: Generics - Exception [message #73175 is a reply to message #73157] |
Wed, 28 January 2009 17:04 |
Eclipse User |
|
|
|
Originally posted by: andrew.eisenberg.springsource.com
This is not possible. According to the Java spec, type variables are not
allowed in a catch clause. In this case, AspectJ follows with the Java
spec.
For more information:
http://www.angelikalanger.com/GenericsFAQ/FAQSections/Techni calDetails.html#
FAQ304
On 28/01/09 6:49 AM, in article
f60204f4e04f7e3f2f123caa2a85d845$1@www.eclipse.org, "Hitalo"
<hitalooliveira18@gmail.com> wrote:
>
> Good morning!
>
> I wonder if this is possible?
> And if you have any way of doing?
> Use "Generics" for exception and the "catch" exception get past ...
>
> public abstract privileged aspect AbstractAspect<C extends Exception> {
>
> abstract pointcut point();
>
> declare soft: C : point();
>
> void around() : point() {
> try {
> return proceed();
> } catch (C e) {
> System.out.println(e.getMessage());
> }
> }
>
> }
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02464 seconds