Bug 132128 - [generics] Type patterns cannot be used to match member types of generic classes
Summary: [generics] Type patterns cannot be used to match member types of generic classes
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.5.0   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-16 06:05 EST by Martin Bravenboer CLA
Modified: 2013-06-24 11:06 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Bravenboer CLA 2006-03-16 06:05:21 EST
Example:
-------------------------------------------------------------
public class TypePattern {
  public static Foo<String>.Bar<String> x;

  public static void main(String[] ps) {
    Object f = x;
  }
}

class Foo<T> {
  class Bar<S> {
  }
}

aspect Get {
  pointcut foo() : get(Foo<String>.Bar<String> *.x);

  before() : foo() {
    System.out.println("Get of x!");
  }
}
-------------------------------------------------------------
Error message:
[error] Syntax error on token ".", "name pattern" expected
pointcut foo() : get(Foo<String>.Bar<String> *.x);

The advice is applied if I use Foo.Bar<String>, but I think it would
be nice if you could specify the actual type parameter of the
enclosing class as well.
Comment 1 Martin Bravenboer CLA 2006-03-16 06:06:09 EST
See also: http://dev.eclipse.org/mhonarc/lists/aspectj-dev/msg02015.html
Comment 2 Andrew Clement CLA 2007-10-24 09:12:24 EDT
look at this for 1.5.4 but might get bumped to 1.6
Comment 3 Andrew Clement CLA 2013-06-24 11:06:54 EDT
unsetting the target field which is currently set for something already released