本文整理了Java中com.thoughtworks.xstream.mapper.Mapper.getItemTypeForItemFieldName()
方法的一些代码示例,展示了Mapper.getItemTypeForItemFieldName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mapper.getItemTypeForItemFieldName()
方法的具体详情如下:
包路径:com.thoughtworks.xstream.mapper.Mapper
类名称:Mapper
方法名:getItemTypeForItemFieldName
暂无
代码示例来源:origin: jenkinsci/jenkins
public Class getItemTypeForItemFieldName(Class definedIn, String itemFieldName) {
return delegate.getItemTypeForItemFieldName(definedIn, itemFieldName);
}
代码示例来源:origin: com.thoughtworks.xstream/xstream
public Class getItemTypeForItemFieldName(Class definedIn, String itemFieldName) {
return getItemTypeForItemFieldNameMapper.getItemTypeForItemFieldName(definedIn, itemFieldName);
}
代码示例来源:origin: jenkinsci/jenkins
private Class determineType(HierarchicalStreamReader reader, boolean validField, Object result, String fieldName, Class definedInCls) {
String classAttribute = reader.getAttribute(mapper.aliasForAttribute("class"));
Class fieldType = reflectionProvider.getFieldType(result, fieldName, definedInCls);
if (classAttribute != null) {
Class specifiedType = mapper.realClass(classAttribute);
if(fieldType.isAssignableFrom(specifiedType))
// make sure that the specified type in XML is compatible with the field type.
// this allows the code to evolve in more flexible way.
return specifiedType;
}
if (!validField) {
Class itemType = mapper.getItemTypeForItemFieldName(result.getClass(), fieldName);
if (itemType != null) {
return itemType;
} else {
return mapper.realClass(reader.getNodeName());
}
} else {
return mapper.defaultImplementationOf(fieldType);
}
}
代码示例来源:origin: com.thoughtworks.xstream/xstream
if (field == null) {
Class itemType = mapper.getItemTypeForItemFieldName(fieldDeclaringClass, fieldName);
if (itemType != null) {
String classAttribute = HierarchicalStreams.readClassAttribute(
代码示例来源:origin: x-stream/xstream
@Override
public Class<?> getItemTypeForItemFieldName(final Class<?> definedIn, final String itemFieldName) {
return getItemTypeForItemFieldNameMapper.getItemTypeForItemFieldName(definedIn, itemFieldName);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream
public Class getItemTypeForItemFieldName(Class definedIn, String itemFieldName) {
return getItemTypeForItemFieldNameMapper.getItemTypeForItemFieldName(definedIn, itemFieldName);
}
代码示例来源:origin: org.jvnet.hudson/xstream
public Class getItemTypeForItemFieldName(Class definedIn, String itemFieldName) {
return wrapped.getItemTypeForItemFieldName(definedIn, itemFieldName);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8
public Class getItemTypeForItemFieldName(Class definedIn, String itemFieldName) {
return getItemTypeForItemFieldNameMapper.getItemTypeForItemFieldName(definedIn, itemFieldName);
}
代码示例来源:origin: com.haulmont.thirdparty/xstream
public Class getItemTypeForItemFieldName(Class definedIn, String itemFieldName) {
return wrapped.getItemTypeForItemFieldName(definedIn, itemFieldName);
}
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
public Class getItemTypeForItemFieldName(Class definedIn, String itemFieldName) {
return wrapped.getItemTypeForItemFieldName(definedIn, itemFieldName);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
public Class getItemTypeForItemFieldName(Class definedIn, String itemFieldName) {
return delegate.getItemTypeForItemFieldName(definedIn, itemFieldName);
}
代码示例来源:origin: apache/servicemix-bundles
public Class getItemTypeForItemFieldName(Class definedIn, String itemFieldName) {
return getItemTypeForItemFieldNameMapper.getItemTypeForItemFieldName(definedIn, itemFieldName);
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
public Class getItemTypeForItemFieldName(Class definedIn, String itemFieldName) {
return wrapped.getItemTypeForItemFieldName(definedIn, itemFieldName);
}
代码示例来源:origin: org.jvnet.hudson/xstream
private Class determineType(HierarchicalStreamReader reader, boolean validField, Object result, String fieldName, Class definedInCls) {
String classAttribute = HierarchicalStreams.readClassAttribute(reader, mapper);
if (classAttribute != null) {
return mapper.realClass(classAttribute);
} else if (!validField) {
Class itemType = mapper.getItemTypeForItemFieldName(result.getClass(), fieldName);
if (itemType != null) {
return itemType;
} else {
String originalNodeName = reader.getNodeName();
if (definedInCls == null) {
for(definedInCls = result.getClass(); definedInCls != null; definedInCls = definedInCls.getSuperclass()) {
if (!mapper.shouldSerializeMember(definedInCls, originalNodeName)) {
return null;
}
}
}
return mapper.realClass(originalNodeName);
}
} else {
return mapper.defaultImplementationOf(reflectionProvider.getFieldType(result, fieldName, definedInCls));
}
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
private Class determineType(HierarchicalStreamReader reader, boolean validField, Object result, String fieldName, Class definedInCls) {
String classAttribute = HierarchicalStreams.readClassAttribute(reader, mapper);
if (classAttribute != null) {
return mapper.realClass(classAttribute);
} else if (!validField) {
Class itemType = mapper.getItemTypeForItemFieldName(result.getClass(), fieldName);
if (itemType != null) {
return itemType;
} else {
String originalNodeName = reader.getNodeName();
if (definedInCls == null) {
for(definedInCls = result.getClass(); definedInCls != null; definedInCls = definedInCls.getSuperclass()) {
if (!mapper.shouldSerializeMember(definedInCls, originalNodeName)) {
return null;
}
}
}
return mapper.realClass(originalNodeName);
}
} else {
return mapper.defaultImplementationOf(reflectionProvider.getFieldType(result, fieldName, definedInCls));
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
private Class determineType(HierarchicalStreamReader reader, boolean validField, Object result, String fieldName, Class definedInCls) {
String classAttribute = reader.getAttribute(mapper.aliasForAttribute("class"));
Class fieldType = reflectionProvider.getFieldType(result, fieldName, definedInCls);
if (classAttribute != null) {
Class specifiedType = mapper.realClass(classAttribute);
if(fieldType.isAssignableFrom(specifiedType))
// make sure that the specified type in XML is compatible with the field type.
// this allows the code to evolve in more flexible way.
return specifiedType;
}
if (!validField) {
Class itemType = mapper.getItemTypeForItemFieldName(result.getClass(), fieldName);
if (itemType != null) {
return itemType;
} else {
return mapper.realClass(reader.getNodeName());
}
} else {
return mapper.defaultImplementationOf(fieldType);
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
private Class determineType(HierarchicalStreamReader reader, boolean validField, Object result, String fieldName, Class definedInCls) {
String classAttribute = reader.getAttribute(mapper.aliasForAttribute("class"));
Class fieldType = reflectionProvider.getFieldType(result, fieldName, definedInCls);
if (classAttribute != null) {
Class specifiedType = mapper.realClass(classAttribute);
if (fieldType.isAssignableFrom(specifiedType)) // make sure that the specified type in XML is compatible with the field type.
// this allows the code to evolve in more flexible way.
{
return specifiedType;
}
}
if (!validField) {
Class itemType = mapper.getItemTypeForItemFieldName(result.getClass(), fieldName);
if (itemType != null) {
return itemType;
} else {
return mapper.realClass(reader.getNodeName());
}
} else {
return mapper.defaultImplementationOf(fieldType);
}
}
代码示例来源:origin: hudson/hudson-2.x
private Class determineType(HierarchicalStreamReader reader, boolean validField, Object result, String fieldName, Class definedInCls) {
String classAttribute = reader.getAttribute(mapper.aliasForAttribute("class"));
Class fieldType = reflectionProvider.getFieldType(result, fieldName, definedInCls);
if (classAttribute != null) {
Class specifiedType = mapper.realClass(classAttribute);
if(fieldType.isAssignableFrom(specifiedType))
// make sure that the specified type in XML is compatible with the field type.
// this allows the code to evolve in more flexible way.
return specifiedType;
}
if (!validField) {
Class itemType = mapper.getItemTypeForItemFieldName(result.getClass(), fieldName);
if (itemType != null) {
return itemType;
} else {
return mapper.realClass(reader.getNodeName());
}
} else {
return mapper.defaultImplementationOf(fieldType);
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
private Class determineType(HierarchicalStreamReader reader, boolean validField, Object result, String fieldName, Class definedInCls) {
String classAttribute = reader.getAttribute(mapper.aliasForAttribute("class"));
Class fieldType = reflectionProvider.getFieldType(result, fieldName, definedInCls);
if (classAttribute != null) {
Class specifiedType = mapper.realClass(classAttribute);
if(fieldType.isAssignableFrom(specifiedType))
// make sure that the specified type in XML is compatible with the field type.
// this allows the code to evolve in more flexible way.
return specifiedType;
}
if (!validField) {
Class itemType = mapper.getItemTypeForItemFieldName(result.getClass(), fieldName);
if (itemType != null) {
return itemType;
} else {
return mapper.realClass(reader.getNodeName());
}
} else {
return mapper.defaultImplementationOf(fieldType);
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
private Class determineType(HierarchicalStreamReader reader, boolean validField, Object result, String fieldName, Class definedInCls) {
String classAttribute = reader.getAttribute(mapper.aliasForAttribute("class"));
Class fieldType = reflectionProvider.getFieldType(result, fieldName, definedInCls);
if (classAttribute != null) {
Class specifiedType = mapper.realClass(classAttribute);
if(fieldType.isAssignableFrom(specifiedType))
// make sure that the specified type in XML is compatible with the field type.
// this allows the code to evolve in more flexible way.
return specifiedType;
}
if (!validField) {
Class itemType = mapper.getItemTypeForItemFieldName(result.getClass(), fieldName);
if (itemType != null) {
return itemType;
} else {
return mapper.realClass(reader.getNodeName());
}
} else {
return mapper.defaultImplementationOf(fieldType);
}
}
内容来源于网络,如有侵权,请联系作者删除!