Example usage for org.springframework.batch.item.file.transform IncorrectTokenCountException IncorrectTokenCountException

List of usage examples for org.springframework.batch.item.file.transform IncorrectTokenCountException IncorrectTokenCountException

Introduction

In this page you can find the example usage for org.springframework.batch.item.file.transform IncorrectTokenCountException IncorrectTokenCountException.

Prototype

public IncorrectTokenCountException(int expectedCount, int actualCount) 

Source Link

Usage

From source file:egovframework.rte.bat.core.item.file.mapping.EgovObjectMapper.java

/**
 * VO , Token? ./*  ww w .  j a  va  2  s .c  o  m*/
 * 
 * @param tokens: LineTokenizer? line? ? token
 * @return T: VO
 */
@SuppressWarnings("unchecked")
public T mapObject(List<String> tokens) {
    int tokenSize = tokens.size();

    // ? names()?      Token    ?.
    if (names.length != tokenSize) {
        throw new IncorrectTokenCountException(names.length, tokenSize);
    }

    return (T) egovReflectionSupport.generateObject((Class<?>) type, tokens, names);
}