Back to project page ExampleApp.
The source code is released under:
Copyright (c) 2014, Altinn All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redis...
If you think the Android project ExampleApp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.altinn.apps.fisher.net; //ww w . ja v a2s. co m /** * This class offers different kind of parser exists, we can get them from this Factory * */ public class ParseManager { public static final int PARSER_TYPE_JSON = 100; public static final int PARSER_TYPE_XML = 101; private static ParseManager mInstance; public ParseManager(){ } public static IParser getParser(int parseType){ if(mInstance == null){ mInstance = new ParseManager(); } return mInstance.createParser(parseType); } private IParser createParser(int parseType){ IParser parser = null; switch(parseType){ case PARSER_TYPE_JSON: parser = new JSParser(); break; case PARSER_TYPE_XML: //parser = new XMLParser(); break; } return parser; } }