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 17787 Details for
Bug 84791
[1.5][compiler] eclipse doesn't allow types to be derived from annotation types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Testcase
DerivedAnnotations.java (text/x-java), 881 bytes, created by
Jon Nall
on 2005-02-09 11:22:53 EST
(
hide
)
Description:
Testcase
Filename:
MIME Type:
Creator:
Jon Nall
Created:
2005-02-09 11:22:53 EST
Size:
881 bytes
patch
obsolete
>import java.lang.annotation.Annotation; >import java.util.Arrays; > >@interface Ann >{ >} > >interface Iface extends Ann >{ >} > >abstract class Klass implements Ann >{ >} > >class SubKlass extends Klass >{ > public Class<? extends Annotation> annotationType() > { > return null; > } >} > >public class DerivedAnnotations >{ > public static void main(String[] args) > { > Class c = SubKlass.class; > System.out.println("Classes:"); > while(c != Object.class) > { > System.out.println("-> " + c.getName()); > c = c.getSuperclass(); > } > > System.out.println(); > System.out.println("Interfaces:"); > c = SubKlass.class; > while(c != Object.class) > { > Class[] i = c.getInterfaces(); > System.out.println("-> " + Arrays.asList(i)); > c = c.getSuperclass(); > } > } >} >
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 84791
: 17787