Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 55561 Details for
Bug 167775
Annotation pointcut fails with supertype reference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Complete Test Case
Test.aj (text/plain), 1.15 KB, created by
Karl Schaefer
on 2006-12-12 23:46:14 EST
(
hide
)
Description:
Complete Test Case
Filename:
MIME Type:
Creator:
Karl Schaefer
Created:
2006-12-12 23:46:14 EST
Size:
1.15 KB
patch
obsolete
>import java.lang.annotation.ElementType; >import java.lang.annotation.Retention; >import java.lang.annotation.RetentionPolicy; >import java.lang.annotation.Target; >import java.lang.reflect.Method; > > >public class Test { > > /** > * @param args > */ > public static void main(String[] args) throws Exception { > Baz baz = new Baz(); > baz.execute(); > > baz = new ChildOfBaz(); > baz.execute(); > > ((ChildOfBaz) baz).execute(); > } > >} > >aspect Foo { > pointcut overriddenMethod(): call(@Bar * *(. .)); > > before(): overriddenMethod() { > System.err.println(thisJoinPointStaticPart); > } >} > >@Retention(RetentionPolicy.RUNTIME) >@Target(ElementType.METHOD) >@interface Bar { > String value() default ""; >} > >class Baz { > public void execute() throws Exception { > Method m = getClass().getMethod("execute", null); > System.err.println(m.isAnnotationPresent(Bar.class)); > System.err.println(getClass().getName()); > } >} > >class ChildOfBaz extends Baz { > @Bar > public void execute() throws Exception { > super.execute(); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 167775
:
55543
|
55544
|
55545
|
55546
|
55547
| 55561