com.thoughtworks.xstream.mapper.Mapper.getImplicitCollectionDefForFieldName()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(206)

本文整理了Java中com.thoughtworks.xstream.mapper.Mapper.getImplicitCollectionDefForFieldName()方法的一些代码示例,展示了Mapper.getImplicitCollectionDefForFieldName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mapper.getImplicitCollectionDefForFieldName()方法的具体详情如下:
包路径:com.thoughtworks.xstream.mapper.Mapper
类名称:Mapper
方法名:getImplicitCollectionDefForFieldName

Mapper.getImplicitCollectionDefForFieldName介绍

暂无

代码示例

代码示例来源:origin: jenkinsci/jenkins

public ImplicitCollectionMapping getImplicitCollectionDefForFieldName(Class itemType, String fieldName) {
  return delegate.getImplicitCollectionDefForFieldName(itemType, fieldName);
}

代码示例来源:origin: com.thoughtworks.xstream/xstream

public ImplicitCollectionMapping getImplicitCollectionDefForFieldName(Class itemType, String fieldName) {
  return getImplicitCollectionDefForFieldNameMapper.getImplicitCollectionDefForFieldName(itemType, fieldName);
}

代码示例来源:origin: jenkinsci/jenkins

public void visit(String fieldName, Class fieldType, Class definedIn, Object newObj) {
  if (!seenAsAttributes.contains(fieldName) && newObj != null) {
    Mapper.ImplicitCollectionMapping mapping = mapper.getImplicitCollectionDefForFieldName(source.getClass(), fieldName);
    if (mapping != null) {
      if (mapping.getItemFieldName() != null) {
        Collection list = (Collection) newObj;
        for (Iterator iter = list.iterator(); iter.hasNext();) {
          Object obj = iter.next();
          writeField(fieldName, mapping.getItemFieldName(), mapping.getItemType(), definedIn, obj);
        }
      } else {
        context.convertAnother(newObj);
      }
    } else {
      writeField(fieldName, fieldName, fieldType, definedIn, newObj);
      seenFields.add(fieldName);
    }
  }
}

代码示例来源:origin: com.thoughtworks.xstream/xstream

} else {
  Mapper.ImplicitCollectionMapping implicitCollectionMapping = mapper
    .getImplicitCollectionDefForFieldName(fieldLocation.definedIn, fieldLocation.fieldName);
  collection = new MappingList(
    (Map)instance, implicitCollectionMapping.getKeyFieldName());

代码示例来源:origin: jenkinsci/jenkins

boolean implicitCollectionHasSameName = mapper.getImplicitCollectionDefForFieldName(result.getClass(), reader.getNodeName()) != null;

代码示例来源:origin: com.thoughtworks.xstream/xstream

final Field defaultField = (Field)defaultFieldDefinition.get(info.fieldName);
Mapper.ImplicitCollectionMapping mapping = mapper
  .getImplicitCollectionDefForFieldName(
    defaultField.getDeclaringClass() == info.definedIn ? sourceType : info.definedIn,
      info.fieldName);

代码示例来源:origin: com.thoughtworks.xstream/xstream

String fieldName = mapper.realMember(fieldDeclaringClass, originalNodeName);
Mapper.ImplicitCollectionMapping implicitCollectionMapping = mapper
  .getImplicitCollectionDefForFieldName(fieldDeclaringClass, fieldName);
final Object value;
String implicitFieldName = null;

代码示例来源:origin: x-stream/xstream

@Override
public ImplicitCollectionMapping getImplicitCollectionDefForFieldName(final Class<?> itemType,
    final String fieldName) {
  return getImplicitCollectionDefForFieldNameMapper.getImplicitCollectionDefForFieldName(itemType, fieldName);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8

public ImplicitCollectionMapping getImplicitCollectionDefForFieldName(Class itemType, String fieldName) {
  return getImplicitCollectionDefForFieldNameMapper.getImplicitCollectionDefForFieldName(itemType, fieldName);
}

代码示例来源:origin: ovea-deprecated/jetty-session-redis

public ImplicitCollectionMapping getImplicitCollectionDefForFieldName(Class itemType, String fieldName) {
  return wrapped.getImplicitCollectionDefForFieldName(itemType, fieldName);
}

代码示例来源:origin: org.sonatype.nexus.xstream/xstream

public ImplicitCollectionMapping getImplicitCollectionDefForFieldName(Class itemType, String fieldName) {
  return wrapped.getImplicitCollectionDefForFieldName(itemType, fieldName);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream

public ImplicitCollectionMapping getImplicitCollectionDefForFieldName(Class itemType, String fieldName) {
  return getImplicitCollectionDefForFieldNameMapper.getImplicitCollectionDefForFieldName(itemType, fieldName);
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

public ImplicitCollectionMapping getImplicitCollectionDefForFieldName(Class itemType, String fieldName) {
  return delegate.getImplicitCollectionDefForFieldName(itemType, fieldName);
}

代码示例来源:origin: org.jvnet.hudson/xstream

public ImplicitCollectionMapping getImplicitCollectionDefForFieldName(Class itemType, String fieldName) {
  return wrapped.getImplicitCollectionDefForFieldName(itemType, fieldName);
}

代码示例来源:origin: com.haulmont.thirdparty/xstream

public ImplicitCollectionMapping getImplicitCollectionDefForFieldName(Class itemType, String fieldName) {
  return wrapped.getImplicitCollectionDefForFieldName(itemType, fieldName);
}

代码示例来源:origin: apache/servicemix-bundles

public ImplicitCollectionMapping getImplicitCollectionDefForFieldName(Class itemType, String fieldName) {
  return getImplicitCollectionDefForFieldNameMapper.getImplicitCollectionDefForFieldName(itemType, fieldName);
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

public void visit(String fieldName, Class fieldType, Class definedIn, Object newObj) {
  if (!seenAsAttributes.contains(fieldName) && newObj != null) {
    Mapper.ImplicitCollectionMapping mapping = mapper.getImplicitCollectionDefForFieldName(source.getClass(), fieldName);
    if (mapping != null) {
      if (mapping.getItemFieldName() != null) {
        Collection list = (Collection) newObj;
        for (Iterator iter = list.iterator(); iter.hasNext();) {
          Object obj = iter.next();
          writeField(fieldName, mapping.getItemFieldName(), mapping.getItemType(), definedIn, obj);
        }
      } else {
        context.convertAnother(newObj);
      }
    } else {
      writeField(fieldName, fieldName, fieldType, definedIn, newObj);
      seenFields.add(fieldName);
    }
  }
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

public void visit(String fieldName, Class fieldType, Class definedIn, Object newObj) {
  if (!seenAsAttributes.contains(fieldName) && newObj != null) {
    Mapper.ImplicitCollectionMapping mapping = mapper.getImplicitCollectionDefForFieldName(source.getClass(), fieldName);
    if (mapping != null) {
      if (mapping.getItemFieldName() != null) {
        Collection list = (Collection) newObj;
        for (Iterator iter = list.iterator(); iter.hasNext();) {
          Object obj = iter.next();
          writeField(fieldName, mapping.getItemFieldName(), mapping.getItemType(), definedIn, obj);
        }
      } else {
        context.convertAnother(newObj);
      }
    } else {
      writeField(fieldName, fieldName, fieldType, definedIn, newObj);
      seenFields.add(fieldName);
    }
  }
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

public void visit(String fieldName, Class fieldType, Class definedIn, Object newObj) {
  if (!seenAsAttributes.contains(fieldName) && newObj != null) {
    Mapper.ImplicitCollectionMapping mapping = mapper.getImplicitCollectionDefForFieldName(source.getClass(), fieldName);
    if (mapping != null) {
      if (mapping.getItemFieldName() != null) {
        Collection list = (Collection) newObj;
        for (Iterator iter = list.iterator(); iter.hasNext();) {
          Object obj = iter.next();
          writeField(fieldName, mapping.getItemFieldName(), mapping.getItemType(), definedIn, obj);
        }
      } else {
        context.convertAnother(newObj);
      }
    } else {
      writeField(fieldName, fieldName, fieldType, definedIn, newObj);
      seenFields.add(fieldName);
    }
  }
}

代码示例来源:origin: hudson/hudson-2.x

public void visit(String fieldName, Class fieldType, Class definedIn, Object newObj) {
  if (!seenAsAttributes.contains(fieldName) && newObj != null) {
    Mapper.ImplicitCollectionMapping mapping = mapper.getImplicitCollectionDefForFieldName(source.getClass(), fieldName);
    if (mapping != null) {
      if (mapping.getItemFieldName() != null) {
        Collection list = (Collection) newObj;
        for (Iterator iter = list.iterator(); iter.hasNext();) {
          Object obj = iter.next();
          writeField(fieldName, mapping.getItemFieldName(), mapping.getItemType(), definedIn, obj);
        }
      } else {
        context.convertAnother(newObj);
      }
    } else {
      writeField(fieldName, fieldName, fieldType, definedIn, newObj);
      seenFields.add(fieldName);
    }
  }
}

相关文章