private Object deserialize ( TypeInfo type , Object rawValue ) throws SerDeException { Object value = null ; if ( rawValue != null ) { switch ( type . getCategory ( ) ) { case PRIMITIVE : value = deserializePrimitive ( ( PrimitiveTypeInfo ) type , rawValue ) ; break ; case STRUCT : value = deserializeStruct ( ( StructTypeInfo ) type , rawValue ) ; break ; case MAP : value = deserializeMap ( ( MapTypeInfo ) type , rawValue ) ; break ; case LIST : value = deserializeList ( ( ListTypeInfo ) type , rawValue ) ; break ; case UNION : value = deserializeUnion ( ( UnionTypeInfo ) type , rawValue ) ; break ; } } return value ; }
Deserializes a raw value to the provided type .