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.

ReturningLists.aj 844B

123456789101112131415161718192021222324252627
  1. import java.util.*;
  2. public aspect ReturningLists {
  3. pointcut listOfInteger() : execution(List<Integer> *(..));
  4. // matches returningListOfInteger
  5. pointcut listOfObject() : execution(List<Object> *(..));
  6. // matches returningListOfObject
  7. pointcut listOfObjects() : execution(List<Object+> *(..));
  8. // matches returningListOfInteger and returningListofObject
  9. pointcut listOfAnything() : execution(List<*> *(..));
  10. // matches returningListOfInteger and returningListofObject
  11. pointcut rawList() : execution(List *(..));
  12. // matches returningRawList
  13. pointcut wildcardList() : execution(List<?> *(..));
  14. // matches nothing
  15. pointcut anyListType() : execution(List+<*> *(..));
  16. // matches returning list of integer, returning list of object,
  17. // returning subtype of list of integer
  18. }