Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

PublicITDs.aj 914B

1234567891011121314151617181920212223242526272829303132333435
  1. import java.util.*;
  2. class Base {
  3. }
  4. public class PublicITDs {
  5. public static void main(String[] argv) {
  6. List<Double> l1 = new ArrayList<Double>();
  7. Base b = new Base();
  8. b.publicMethod1(l1);
  9. b.publicMethod2(l1,l1);
  10. Base b2 = new Base(l1);
  11. Base b3 = new Base(l1,l1);
  12. Map<Integer,Double> m1 = new HashMap<Integer,Double>();
  13. Base b4 = new Base(l1,m1);
  14. }
  15. }
  16. aspect X {
  17. // methods
  18. public <R extends Number> void Base.publicMethod1(List<R> lr) {}
  19. public <R extends Number> void Base.publicMethod2(List<R> lr1,List<R> lr2) {}
  20. // ctor
  21. public <P extends Number> Base.new(List<P> lr) { this(); }
  22. public <P extends Number> Base.new(List<P> lr1,List<P> lr2) { this(); }
  23. public <P,Q extends Number> Base.new(List<P> lp,Map<Q,P> m1) { this(); }
  24. // what use is this next one??
  25. // public <R extends Number> R Base.publicMethod3() { return null;}
  26. }