本文整理了Java中com.thoughtworks.xstream.mapper.Mapper.isImmutableValueType()
方法的一些代码示例,展示了Mapper.isImmutableValueType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mapper.isImmutableValueType()
方法的具体详情如下:
包路径:com.thoughtworks.xstream.mapper.Mapper
类名称:Mapper
方法名:isImmutableValueType
[英]Whether this type is a simple immutable value (int, boolean, String, URL, etc). Immutable types will be repeatedly written in the serialized stream, instead of using object references.
[中]该类型是否为简单的不可变值(int、boolean、String、URL等)。不可变类型将重复写入序列化流中,而不是使用对象引用。
代码示例来源:origin: jenkinsci/jenkins
public boolean isImmutableValueType(Class type) {
return delegate.isImmutableValueType(type);
}
代码示例来源:origin: com.thoughtworks.xstream/xstream
public boolean isImmutableValueType(Class type) {
return isImmutableValueTypeMapper.isImmutableValueType(type);
}
代码示例来源:origin: com.thoughtworks.xstream/xstream
public void convert(Object item, Converter converter) {
if (getMapper().isImmutableValueType(item.getClass())) {
代码示例来源:origin: com.haulmont.thirdparty/xstream
public boolean isImmutableValueType(Class type) {
return wrapped.isImmutableValueType(type);
}
代码示例来源:origin: x-stream/xstream
@Override
public boolean isImmutableValueType(final Class<?> type) {
return isImmutableValueTypeMapper.isImmutableValueType(type);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
public boolean isImmutableValueType(Class type) {
return delegate.isImmutableValueType(type);
}
代码示例来源:origin: org.jvnet.hudson/xstream
public boolean isImmutableValueType(Class type) {
return wrapped.isImmutableValueType(type);
}
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
public boolean isImmutableValueType(Class type) {
return wrapped.isImmutableValueType(type);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream
public boolean isImmutableValueType(Class type) {
return isImmutableValueTypeMapper.isImmutableValueType(type);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8
public boolean isImmutableValueType(Class type) {
return isImmutableValueTypeMapper.isImmutableValueType(type);
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
public boolean isImmutableValueType(Class type) {
return wrapped.isImmutableValueType(type);
}
代码示例来源:origin: apache/servicemix-bundles
public boolean isImmutableValueType(Class type) {
return isImmutableValueTypeMapper.isImmutableValueType(type);
}
代码示例来源:origin: micromata/projectforge
@Override
public void convertAnother(Object item)
{
Class<?> targetClass = item.getClass();
while (Enhancer.isEnhanced(targetClass) == true) {
targetClass = targetClass.getSuperclass();
}
Converter converter = converterLookup.lookupConverterForType(targetClass);
Object realItem = HibernateProxyHelper.get(item);
if (classMapper.isImmutableValueType(realItem.getClass())) {
// strings, ints, dates, etc... don't bother using references.
converter.marshal(item, writer, this);
} else {
Object idOfExistingReference = references.lookupId(realItem);
if (idOfExistingReference != null) {
writer.addAttribute("reference", idOfExistingReference.toString());
return;
}
String newId = idGenerator.next(realItem);
writer.addAttribute("id", newId);
references.associateId(realItem, newId);
if (log.isDebugEnabled()) {
log.debug("marshalling object " + realItem.getClass() + " to stream");
}
converter.marshal(realItem, writer, this);
}
}
代码示例来源:origin: org.jvnet.hudson/xstream
public void convert(Object item, Converter converter) {
if (getMapper().isImmutableValueType(item.getClass())) {
// strings, ints, dates, etc... don't bother using references.
converter.marshal(item, writer, this);
} else {
Path currentPath = pathTracker.getPath();
Object existingReferenceKey = references.lookupId(item);
if (existingReferenceKey != null) {
String attributeName = getMapper().aliasForSystemAttribute("reference");
if (attributeName != null) {
writer.addAttribute(attributeName, createReference(currentPath, existingReferenceKey));
}
} else if (implicitElements.lookupId(item) != null) {
throw new ReferencedImplicitElementException(item, currentPath);
} else {
Object newReferenceKey = createReferenceKey(currentPath, item);
if (lastPath == null || !currentPath.isAncestor(lastPath)) {
fireValidReference(newReferenceKey);
lastPath = currentPath;
references.associateId(item, newReferenceKey);
} else {
implicitElements.associateId(item, newReferenceKey);
}
converter.marshal(item, writer, this);
}
}
}
代码示例来源:origin: ovea-deprecated/jetty-session-redis
public void convert(Object item, Converter converter) {
if (getMapper().isImmutableValueType(item.getClass())) {
// strings, ints, dates, etc... don't bother using references.
converter.marshal(item, writer, this);
} else {
Path currentPath = pathTracker.getPath();
Object existingReferenceKey = references.lookupId(item);
if (existingReferenceKey != null) {
String attributeName = getMapper().aliasForSystemAttribute("reference");
if (attributeName != null) {
writer.addAttribute(attributeName, createReference(currentPath, existingReferenceKey));
}
} else if (implicitElements.lookupId(item) != null) {
throw new ReferencedImplicitElementException(item, currentPath);
} else {
Object newReferenceKey = createReferenceKey(currentPath, item);
if (lastPath == null || !currentPath.isAncestor(lastPath)) {
fireValidReference(newReferenceKey);
lastPath = currentPath;
references.associateId(item, newReferenceKey);
} else {
implicitElements.associateId(item, newReferenceKey);
}
converter.marshal(item, writer, this);
}
}
}
代码示例来源:origin: com.haulmont.thirdparty/xstream
public void convert(Object item, Converter converter) {
if (getMapper().isImmutableValueType(item.getClass())) {
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8
public void convert(Object item, Converter converter) {
if (getMapper().isImmutableValueType(item.getClass())) {
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream
public void convert(Object item, Converter converter) {
if (getMapper().isImmutableValueType(item.getClass())) {
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
public void convert(Object item, Converter converter) {
if (getMapper().isImmutableValueType(item.getClass())) {
代码示例来源:origin: x-stream/xstream
@Override
public void convert(final Object item, final Converter converter) {
if (getMapper().isImmutableValueType(item.getClass())) {
内容来源于网络,如有侵权,请联系作者删除!