Package com.cloudcontrolled.api.annotation

Examples of com.cloudcontrolled.api.annotation.Default


      infixPotentialDefaults(request, superClass, infixPotentialValuesOfSuperClass);
    }

    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 || ((value instanceof String ? ((String) value).isEmpty() : false))) {
            property.set(request, defaultValue.value());
          }
        } catch (Exception e) {
          throw new RuntimeException(e);
        }
      }
View Full Code Here

TOP

Related Classes of com.cloudcontrolled.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.