return json_om;
}
protected JSONObjectMapping mapClass(Class<?> clazz) throws JSONException {
JSONObjectFieldMapping json_fm;
JSON json;
JSONIgnore ignore;
JSONObjectMapping json_om = JSONObjectMapping.getObjectMapping();
classMappings.put( clazz.getName(), json_om );
Constructor<?> constructor = null;
try {
constructor = clazz.getConstructor( zeroArgsParameterTypes );
}
catch (NoSuchMethodException e) {
}
if ( constructor == null ) {
throw new JSONException( clazz.getName() + " does not have a zero argument constructor!" );
}
json = clazz.getAnnotation( JSON.class );
if ( json != null ) {
String[] ignores = json.ignore();
for ( int i=0; i<ignores.length; ++i) {
json_om.ignore.add( ignores[ i ] );
}
String [] nullables = json.nullable();
for ( int i=0; i<nullables.length; ++i ) {
json_om.nullableSet.add( nullables[ i ] );
}
String[] nullValues = json.nullValues();
for ( int i=0; i<nullValues.length; ++i ) {
json_om.nullValuesSet.add( nullValues[ i ] );
}
}