Logo Search packages:      
Sourcecode: libjson-java version File versions

JsonValueProcessor net::sf::json::JsonConfig::findJsonValueProcessor ( Class  propertyType,
String  key 
) [inline]

Finds a JsonValueProcessor.
It will search the registered JsonValueProcessors in the following order:

  1. key
  2. type
Returns null if none is registered.
Used when transforming from Java to Json.

propertyType the type of the property
key the name of the property which may belong to the target class

Definition at line 313 of file JsonConfig.java.

References net::sf::json::processors::JsonValueProcessorMatcher::getMatch().

      JsonValueProcessor jsonValueProcessor = null;
      jsonValueProcessor = (JsonValueProcessor) keyMap.get( key );
      if( jsonValueProcessor != null ) {
         return jsonValueProcessor;

      Object tkey = jsonValueProcessorMatcher.getMatch( propertyType, typeMap.keySet() );
      jsonValueProcessor = (JsonValueProcessor) typeMap.get( tkey );
      if( jsonValueProcessor != null ) {
         return jsonValueProcessor;

      return null;

Generated by  Doxygen 1.6.0   Back to index