You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Example2.java 888B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // nested values, more complex than just a marker
  2. import java.lang.annotation.*;
  3. aspect X {
  4. declare parents: @Bar(value = "123") * implements java.io.Serializable;
  5. }
  6. @Bar(value="123")
  7. @NamedQuery(name = "Department.findAll",query = "select d from Department d order by d.name ASC",hints = {@QueryHint(name = "org.hibernate.cacheable",value = "true")})
  8. public class Example2 {
  9. public static void main(String []argv) {
  10. Example2 e = new Example2();
  11. if (e instanceof java.io.Serializable) {
  12. System.out.println("yes");
  13. } else {
  14. System.out.println("no");
  15. }
  16. }
  17. }
  18. @Retention(RetentionPolicy.RUNTIME)
  19. @interface QueryHint {
  20. String name();
  21. String value();
  22. }
  23. @Retention(RetentionPolicy.RUNTIME)
  24. @interface NamedQuery {
  25. String name();
  26. String query();
  27. QueryHint[] hints();
  28. }
  29. @Retention(RetentionPolicy.RUNTIME)
  30. @interface Bar {
  31. String value();
  32. }