Package com.blazebit.cdi.cleanup.annotation

Examples of com.blazebit.cdi.cleanup.annotation.Cleanup


      String cleanupName) throws Exception {
    boolean invoked = false;

    if (!cleanupName.isEmpty()) {
      for (Method m : clazz.getMethods()) {
        Cleanup cleanup = m.getAnnotation(Cleanup.class);

        if (cleanup != null && cleanup.value().equals(cleanupName)) {
          m.invoke(target);
          invoked = true;
        }
      }
    }
View Full Code Here


      Class<?> cleanupClazz) throws Exception {
    boolean invoked = false;

    if (!cleanupClazz.equals(NullClass.class)) {
      for (Method m : clazz.getMethods()) {
        Cleanup cleanup = m.getAnnotation(Cleanup.class);

        if (cleanup != null && cleanup.value().equals(cleanupClazz)) {
          m.invoke(target);
          invoked = true;
        }
      }
    }
View Full Code Here

  private boolean invokeCleanups(Object target, Class<?> cleanupClazz)
      throws Exception {
    if (cleanupClazz != null) {
      for (Method m : target.getClass().getMethods()) {
        Cleanup cleanup = m.getAnnotation(Cleanup.class);

        if (cleanup != null && cleanup.value().equals(cleanupClazz)) {
          m.invoke(target);
          return true;
        }
      }
    } else {
View Full Code Here

TOP

Related Classes of com.blazebit.cdi.cleanup.annotation.Cleanup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.