package age;

import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class CSVReader {
	
	private static final int CLASS_INDEX = 0;

	public static void main(String[] args){
		
	}
	
	public static void createMappingFromLine(String[] tokens,
			Map<String, Object> values,
			Map<String, String> fieldTypes){
		for(int i = 1; i < tokens.length; i++){
			String[] subtokens = tokens[i].split(":");
			String fieldName = subtokens[0];
			String value = subtokens[1];
			String type = subtokens[2];
			values.put(fieldName, SkillObjectCreator.valueOf(type, value));
			fieldTypes.put(fieldName, type);
		}
	}

	public static String getClassNameFromEntry(String[] tokens){
		if(tokens.length > 0){
			return tokens[CLASS_INDEX];
		}else{
			return null;
		}
	}
	
	public static List<String> readCSV(Path path){
		List<String> content = new ArrayList<>();
		try{
			Files.lines(path).forEach( (String line) -> {
				content.add(line);
			});
		} catch (IOException e) {
			e.printStackTrace();
		}
		return content;
	}
	
}

@@ -39,39 +39,8 @@
 on;%0A
-import java.lang.reflect.Type;%0A
 impo
@@ -63,16 +63,16 @@
 .Files;%0A
+
 import j
@@ -233,16 +233,158 @@
 DEX = 0;
+%0A%09private static final int FIELD_NAME_SUBINDEX = 0;%0A%09private static final int TYPE_SUBINDEX = 1;%0A%09private static final int VALUE_SUBINDEX = 2;
 %0A%0A%09publi
@@ -672,17 +672,35 @@
 btokens%5B
-0
+FIELD_NAME_SUBINDEX
 %5D;%0A%09%09%09St
@@ -722,17 +722,30 @@
 btokens%5B
-1
+VALUE_SUBINDEX
 %5D;%0A%09%09%09St
@@ -766,17 +766,29 @@
 btokens%5B
-2
+TYPE_SUBINDEX
 %5D;%0A%09%09%09va

Use constants for token subindices