I have a Java Class that I suspect can use a ReflectionUtil here because there are too many switch/cases, any advice? I have a chunk of code here:
public class ParserFactory
{
    public static ParserClass getParserClass(InputStream is, CustomMap customMap,
                                           DataHandler recordHandler, DataHandler columnHandler) throws JsonProcessingException
    {
        ParserClassType ParserClassType = ParserClassType.getParserClassType(customMap.getParser());
        switch (ParserClassType)
        {
            case SPECIFIC_XML:
                return new SpecificXMLParser(is, customMap.getProperties(), recordHandler, columnHandler);
            case XML:
                return new GenericXMLParser(is, customMap.getProperties(), recordHandler, columnHandler);
            case JSON:
                return new GenericJSONParser(is, customMap.getProperties(), recordHandler, columnHandler);
            case SPECIAL:
                return new SpecialParser(is, customMap.getProperties(), recordHandler, columnHandler);
            case FW:
                return new GenericFixedWidthParser(is, customMap.getProperties(), recordHandler, columnHandler);
            case CSV:
                return new GenericCSVParser(is, customMap.getProperties(), recordHandler, columnHandler);
            default:
                throw new IllegalArgumentException(&quot;ParserClassType not found.&quot;);
        }
    }

    public static String getFileExtension(CustomMap customMap)
    {
        ParserClassType ParserClassType = ParserClassType.getParserClassType(customMap.getParser());
        switch (ParserClassType)
        {
            case SPECIFIC_XML: 
                return SpecificXMLParser.FILE_TYPE_OUTPUT;
            case XML:
                return GenericXMLParser.FILE_TYPE_OUTPUT;
            case JSON:
                return GenericJSONParser.FILE_TYPE_OUTPUT;
            case SPECIAL:
                return SpecialParser.FILE_TYPE_OUTPUT;
            case FW:
                return GenericFixedWidthParser.FILE_TYPE_OUTPUT;
            case CSV:
                return GenericCSVParser.FILE_TYPE_OUTPUT;
            default:
                throw new IllegalArgumentException(&quot;ParserClassType not found.&quot;);
        }
    }
}

Now, it's not exactly too important what all these arguments are. In getParserClass, I retrieve an enum from ParserClassType. The switch handles all the possible values. A certain value will return a ParserClass.
The other function, getFileExtension, retrieves a static string from a parser class.
As my project grows, I will have many new parsers that I add. I want to make this as flexible and less-hectic as possible. I don't want to keep adding cases to this function. So.
I was looking into EnumMap. I was thinking of mapping an ENUM to a ParserClass name, so for example &quot;XML&quot; would make to &quot;GenericXMLParser.class&quot;, and then I could use a ReflectionUtil to create the class with the arguments necessary or retrieve that string. Therefore, if I have to make any additions, all I need to do is add the ENUM to the enum class and make an addition to the map. But, ReflectionUtils seems to require me to provide the path of the parser. Something like &quot;com.package.service.more.bs.SpecificXMLParser&quot;. I would rather not do that...
Any ideas?
The only problem I see with this code is, that for extending the enum, you need to change two methods in the code, which spreads out changes instead of keeping them local to a single place.
You could however harness the power of the java enum (which can have fields and methods) to make the changes locally.
Something along the lines of:
enum ParserClassType {
    SPECIFIC_XML(SpecificXMLParser.FILE_TYPE_OUTPUT) {
        public ParserClass createParser(InputStream is, etc, ...) {
            return new SpecificXMLParser(...);
        }
    },
    XML(GenericXMLParser.FILE_TYPE_OUTPUT) {
        public ParserClass createParser(InputStream is, etc, ...) {
            return new GenericXMLParser(...);
        }
    },
    ...

    private final String fileExtension;

    private ParserClassType(String fileExtension) {
        this.fileExtension = fileExtension;
    }

    public String getFileExtension() {
        return fileExtension;
    }

    public abstract ParserClass createParser(InputStream is, etc, ...);
}

public static String getFileExtension(...) {
    ParserClassType parserClassType = ...
    return parserClassType.getFileExtension();
}

public ParserClass getParserClass(...) {
    ParserClassType parserClassType =  ...
    return parserClassType.createParser(...);
}

As you see, when you add a new type, you simply have to extend the enum. All the client code stays unmodified.
Apart from that, please look up the java naming conventions. Variables should start with lower case letters and definitely not shadow their class names.
Furthermore, getParserClass() / ParserClass is badly named, as it clearly involves around a concrete parser / parserInstance, not around a class.