
com.workday.autoparse.json.parser.JsonObjectParserTables Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of autoparse-json Show documentation
Show all versions of autoparse-json Show documentation
A java library built specifically for Android that uses code generation to parse JSON into custom objects in your project.
/*
* Copyright 2016 Workday, Inc.
*
* This software is available under the MIT license.
* Please see the LICENSE.txt file in this project.
*/
package com.workday.autoparse.json.parser;
import com.workday.autoparse.json.context.GeneratedClassNames;
/**
* @author nathan.taylor
* @since 2015-08-21.
*/
public class JsonObjectParserTables {
private JsonObjectParserTables() {
}
public static JsonObjectParserTable getParserTable(String packageName) {
try {
String parserMapSimpleName = GeneratedClassNames.CLASS_JSON_OBJECT_PARSER_TABLE;
String parserMapFullName =
GeneratedClassNames.getQualifiedName(packageName, parserMapSimpleName);
return (JsonObjectParserTable) Class.forName(parserMapFullName).newInstance();
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
} catch (InstantiationException e) {
throw new RuntimeException(e);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy