if / else if   could be refactored to use HashMap<String, Class>   OR as @penguinho pointed out, Java7 allows one to use a switch statement for strings.