Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Generic Aspects in M4

Strange that it complains about java.lang.StringBuilder missing -
definetly running the compiler on top of a 1.5 VM?  I think pointcuts
were pretty much finished in terms of generics for M4, ITDs were not. 
If you want to play about a bit, you could prevent it (with withincode
or something) attempting to weave the onException() method that uses
the stringbuilder class...

Andy.

On 22/10/05, Oliver Böhm <boehm@xxxxxxxxxx> wrote:
> Hello,
>
> I tried the ExeptionHandling example in the developers notebook
> (http://www.eclipse.org/aspectj/doc/next/adk15notebook/generics-inAspectJ5.html#d0e2939)
> but get a strange error message:
>
> can't determine superclass of missing type java.lang.StringBuilder
> when matching pointcut ((within(de.aosd..*) && call(* doIO*(..))) &&
> persingleton(de.aosd.IOExceptionHandling))
> when matching shadow method-call(java.lang.StringBuilder
> java.lang.StringBuilder.append(java.lang.String))
> when weaving type de.aosd.IOExceptionHandling
> when weaving aspects
> when weaving
> when batch building
> BuildConfig[/home/oliver/doc/Kurs/AspectJ/www/AOP_AspectJ/examples/workspace/.metadata/.plugins/org.eclipse.ajdt.core/Kap07-2aAbstractGenerics.generated.lst]
> #Files=3
>
> The ExceptionHandling and IOExceptionHandling aspects are copied from
> the developers notebook. Here the 2 classes (without comments):
>
> public aspect IOExceptionHandling extends ExceptionHandling<IOException> {
>     protected pointcut inExceptionHandlingScope() :
>         call(* doIO*(..)) && within(de.aosd..*);
>     protected void onException(IOException ex) {
>         System.err.println("handled exception: " + ex.getMessage());
>     }
> }
>
> public abstract aspect ExceptionHandling<T extends Throwable> {
>     protected abstract void onException(T anException);
>     protected abstract pointcut inExceptionHandlingScope();
>     declare soft: T : inExceptionHandlingScope();
>     after() throwing (T anException) : inExceptionHandlingScope() {
>         onException(anException);
>     }
> }
>
> I have no idea what the compiler wants to tell me. Could it be that
> Generics in M4 is not yet fully supported?
>
> regards
> Oliver
> --
> Oliver Böhm
> http://www.javatux.de
>
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-dev
>


Back to the top