Package org.simpleframework.xml

Examples of org.simpleframework.xml.Element


  private static List<TransferPluginOption> getOrderedOptions(Class<? extends TransferSettings> transferSettingsClass, int level) {
    List<Field> fields = getOrderedFields(transferSettingsClass);
    ImmutableList.Builder<TransferPluginOption> options = ImmutableList.builder();

    for (Field field : fields) {
      Element elementAnnotation = field.getAnnotation(Element.class);
      Setup setupAnnotation = field.getAnnotation(Setup.class);

      boolean hasName = !elementAnnotation.name().equalsIgnoreCase("");
      boolean hasDescription = setupAnnotation != null && !setupAnnotation.description().equals("");
      boolean hasCallback = setupAnnotation != null && !setupAnnotation.callback().isInterface();
      boolean hasConverter = setupAnnotation != null && !setupAnnotation.converter().isInterface();

      String name = (hasName) ? elementAnnotation.name() : field.getName();
      String description = (hasDescription) ? setupAnnotation.description() : field.getName();
      Class<? extends TransferPluginOptionCallback> callback = (hasCallback) ? setupAnnotation.callback() : null;
      Class<? extends TransferPluginOptionConverter> converter = (hasConverter) ? setupAnnotation.converter() : null;
      boolean required = elementAnnotation.required();
      boolean sensitive = setupAnnotation != null && setupAnnotation.sensitive();
      boolean singular = setupAnnotation != null && setupAnnotation.singular();
      boolean encrypted = field.getAnnotation(Encrypted.class) != null;

      boolean isNestedOption = TransferSettings.class.isAssignableFrom(field.getType());
View Full Code Here

TOP

Related Classes of org.simpleframework.xml.Element

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.