Posted By

nialace on 11/21/10


Tagged


Versions (?)

inheritance test


 / Published in: Java
 

  1. private void setThreadPooledMethods() {
  2.  
  3. final Method[] methods = TransactionService.class.getMethods();
  4. for (final Method aMethod : methods) {
  5. boolean isSecurityRelated = false;
  6. final Class[] parameters = aMethod.getParameterTypes();
  7. for (final Class<?> element : parameters) {
  8. if ((SecurityMessage.class).isAssignableFrom(element)) {
  9. isSecurityRelated = true;
  10. break;
  11. }
  12. }
  13.  
  14. if (isSecurityRelated) {
  15. System.out.println(aMethod.getName());
  16. } else {
  17. //System.out.println("Non eligible :" + aMethod.getName());
  18. }
  19. }
  20. }

Report this snippet  

You need to login to post a comment.