import java.io.BufferedReader; import java.util.HashMap; public class ParameterChecker { HashMap map = new HashMap(); public ParameterChecker(BufferedReader reader) throws Exception { String s; while ((s = reader.readLine()) != null) { String[] tokens = s.split("\\s"); map.put(tokens[0], tokens); } } public String[] getChecks(String functionName) { String[] checks = map.get(functionName); if (checks == null && (functionName.endsWith("fv") || functionName.endsWith("xv") || functionName.endsWith("iv"))) { functionName = functionName.substring(0, functionName.length() - 2); checks = map.get(functionName); } return checks; } }