Package com.googlecode.jcsv.annotations

Examples of com.googlecode.jcsv.annotations.MapToColumn


   *            The data that should be set
   */
  private void fillObject(E entry, String[] data) {
    for (Field field : entry.getClass().getDeclaredFields()) {
      // check if there is a MapToColumn Annotation
      MapToColumn mapAnnotation = field.getAnnotation(MapToColumn.class);
      if (mapAnnotation != null) {
        // read the annotation column
        int column = mapAnnotation.column();

        // read the annotation type. If type is Default.class, then
        // the type of the field will be used.
        Class<?> type;
        if (mapAnnotation.type().equals(MapToColumn.Default.class)) {
          // use the field type
          type = field.getType();
        } else {
          // use the annotated type
          type = mapAnnotation.type();
        }

        // load the appropriate value processor
        ValueProcessor<?> vp = provider.getValueProcessor(type);

View Full Code Here

TOP

Related Classes of com.googlecode.jcsv.annotations.MapToColumn

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.