Community
Participate
Working Groups
1)the first problem: public aspect SuperAspect<T,S>{ ...... } this SuperAspect can be compiled successfully, but i can not write any of its subaspect : public aspect SubAspect extends SuperAspect<String,String>{ } That means the SubAspect can not be compiled, the message is : Message: NullPointerException thrown: null Stack trace: java.lang.NullPointerException at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ClassScope.detectHierarchyC ycle(ClassScope.java:928) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReferen ce.internalResolveType(ParameterizedSingleTypeReference.java:145) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReferen ce.resolveType(ParameterizedSingleTypeReference.java:214) ...... 2)The second problem: public interface TheInterface<T>{ ... } public class AnotherClass{} The problem is: The following code can not be compiled: public aspect SomeAspect{ declare parents: AnotherClass implements TheInterface<String>; ... }
Bug (1) has already been fixed in CVS. We have not yet made the fix available in a dev build.
target m3
let me take a look at this..
public aspect SubAspect extends SuperAspect<String,String>{} this is actually illegal because you can only sub-type an abstract aspect - and you should get an error message. However, if you do make SuperAspect abstract then it will still fail to compile due to us attempting to locate the the type 'SuperAspect<String,String>' when we should be looking for simply 'SuperAspect'. This is simple to fix. I initially hoped the declare parents problem was in our PatternParser code - which wouldn't be too tough to fix. But I think it might be in the up front parser which makes it a little messier...
*** Bug 98592 has been marked as a duplicate of this bug. ***
oops, Bug 98592 not a duplicate at all! my bad.
declare parents is now fully operational with parameterized types. Declaring generic abstract aspects and extending them is also fixed, in the M3 build use of type variables within pointcuts, declare statements and itds will lead to errors (mostly UnsupportedOperationExceptions). In M4 this implementation will be completed. Use type variables for methods, fields etc. is fully working.