Package com.apitrary.api.annotation

Examples of com.apitrary.api.annotation.Default


      infixPotentialPathDefaults(request, superClass);
    }

    Field[] declaredFields = targetClazz.getDeclaredFields();
    for (Field property : declaredFields) {
      Default defaultValue = property.getAnnotation(Default.class);
      if (null != defaultValue) {
        property.setAccessible(true);
        try {
          Object value = property.get(request);
          if (value == null) {
            property.set(request, defaultValue.value());
          }
        } catch (Exception e) {
          throw new RuntimeException(e);
        }
      }
View Full Code Here


      infixPotentialPathDefaults(request, superClass);
    }

    Field[] declaredFields = targetClazz.getDeclaredFields();
    for (Field property : declaredFields) {
      Default defaultValue = property.getAnnotation(Default.class);
      if (null != defaultValue) {
        property.setAccessible(true);
        try {
          Object value = property.get(request);
          if (value == null) {
            property.set(request, defaultValue.value());
          }
        } catch (Exception e) {
          throw new RuntimeException(e);
        }
      }
View Full Code Here

TOP

Related Classes of com.apitrary.api.annotation.Default

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.