Java 类org.codehaus.jackson.map.util.Provider 实例源码

项目:12306-android-Decompile    文件:OptionalHandlerFactory.java   
public JsonSerializer<?> findSerializer(SerializationConfig paramSerializationConfig, JavaType paramJavaType)
{
  Class localClass = paramJavaType.getRawClass();
  String str1 = localClass.getName();
  String str2;
  if (str1.startsWith("org.joda.time."))
    str2 = "org.codehaus.jackson.map.ext.JodaSerializers";
  Object localObject;
  while (true)
  {
    localObject = instantiate(str2);
    if (localObject != null)
      break;
    return null;
    if ((str1.startsWith("javax.xml.")) || (hasSupertypeStartingWith(localClass, "javax.xml.")))
    {
      str2 = "org.codehaus.jackson.map.ext.CoreXMLSerializers";
      continue;
    }
    if (doesImplement(localClass, "org.w3c.dom.Node"))
      return (JsonSerializer)instantiate("org.codehaus.jackson.map.ext.DOMSerializer");
    return null;
  }
  Collection localCollection = ((Provider)localObject).provide();
  Iterator localIterator1 = localCollection.iterator();
  while (localIterator1.hasNext())
  {
    Map.Entry localEntry2 = (Map.Entry)localIterator1.next();
    if (localClass == localEntry2.getKey())
      return (JsonSerializer)localEntry2.getValue();
  }
  Iterator localIterator2 = localCollection.iterator();
  while (localIterator2.hasNext())
  {
    Map.Entry localEntry1 = (Map.Entry)localIterator2.next();
    if (((Class)localEntry1.getKey()).isAssignableFrom(localClass))
      return (JsonSerializer)localEntry1.getValue();
  }
  return null;
}
项目:12306-android-Decompile    文件:OptionalHandlerFactory.java   
public JsonSerializer<?> findSerializer(SerializationConfig paramSerializationConfig, JavaType paramJavaType)
{
  Class localClass = paramJavaType.getRawClass();
  String str1 = localClass.getName();
  String str2;
  if (str1.startsWith("org.joda.time."))
    str2 = "org.codehaus.jackson.map.ext.JodaSerializers";
  Object localObject;
  while (true)
  {
    localObject = instantiate(str2);
    if (localObject != null)
      break;
    return null;
    if ((str1.startsWith("javax.xml.")) || (hasSupertypeStartingWith(localClass, "javax.xml.")))
    {
      str2 = "org.codehaus.jackson.map.ext.CoreXMLSerializers";
      continue;
    }
    if (doesImplement(localClass, "org.w3c.dom.Node"))
      return (JsonSerializer)instantiate("org.codehaus.jackson.map.ext.DOMSerializer");
    return null;
  }
  Collection localCollection = ((Provider)localObject).provide();
  Iterator localIterator1 = localCollection.iterator();
  while (localIterator1.hasNext())
  {
    Map.Entry localEntry2 = (Map.Entry)localIterator1.next();
    if (localClass == localEntry2.getKey())
      return (JsonSerializer)localEntry2.getValue();
  }
  Iterator localIterator2 = localCollection.iterator();
  while (localIterator2.hasNext())
  {
    Map.Entry localEntry1 = (Map.Entry)localIterator2.next();
    if (((Class)localEntry1.getKey()).isAssignableFrom(localClass))
      return (JsonSerializer)localEntry1.getValue();
  }
  return null;
}