本文整理汇总了Java中com.thoughtworks.xstream.io.AbstractReader类的典型用法代码示例。如果您正苦于以下问题:Java AbstractReader类的具体用法?Java AbstractReader怎么用?Java AbstractReader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbstractReader类属于com.thoughtworks.xstream.io包,在下文中一共展示了AbstractReader类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ReferenceByXPathUnmarshaller
import com.thoughtworks.xstream.io.AbstractReader; //导入依赖的package包/类
public ReferenceByXPathUnmarshaller(
final Object root, final HierarchicalStreamReader reader, final ConverterLookup converterLookup,
final Mapper mapper) {
super(root, reader, converterLookup, mapper);
this.reader = new PathTrackingReader(reader, pathTracker);
isNameEncoding = reader.underlyingReader() instanceof AbstractReader;
}
示例2: getReferenceKey
import com.thoughtworks.xstream.io.AbstractReader; //导入依赖的package包/类
@Override
protected Path getReferenceKey(final String reference) {
final Path path = new Path(isNameEncoding
? ((AbstractReader)reader.underlyingReader()).decodeNode(reference)
: reference);
// We have absolute references, if path starts with '/'
return reference.charAt(0) != '/' ? pathTracker.getPath().apply(path) : path;
}
示例3: getReferenceKey
import com.thoughtworks.xstream.io.AbstractReader; //导入依赖的package包/类
protected Object getReferenceKey(String paramString)
{
String str;
if (this.isNameEncoding)
str = ((AbstractReader)this.reader.underlyingReader()).decodeNode(paramString);
else
str = paramString;
Path localPath = new Path(str);
if (paramString.charAt(0) != '/')
return this.pathTracker.getPath().apply(localPath);
return localPath;
}
示例4: ReferenceByXPathUnmarshaller
import com.thoughtworks.xstream.io.AbstractReader; //导入依赖的package包/类
public ReferenceByXPathUnmarshaller(Object paramObject, HierarchicalStreamReader paramHierarchicalStreamReader, ConverterLookup paramConverterLookup, Mapper paramMapper)
{
super(paramObject, paramHierarchicalStreamReader, paramConverterLookup, paramMapper);
this.reader = new PathTrackingReader(paramHierarchicalStreamReader, this.pathTracker);
this.isNameEncoding = (paramHierarchicalStreamReader.underlyingReader() instanceof AbstractReader);
}