Java Code Examples for com.thoughtworks.xstream.mapper.Mapper#aliasForSystemAttribute()
The following examples show how to use
com.thoughtworks.xstream.mapper.Mapper#aliasForSystemAttribute() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HierarchicalStreams.java From lams with GNU General Public License v2.0 | 5 votes |
public static String readClassAttribute(HierarchicalStreamReader reader, Mapper mapper) { String attributeName = mapper.aliasForSystemAttribute("resolves-to"); String classAttribute = attributeName == null ? null : reader.getAttribute(attributeName); if (classAttribute == null) { attributeName = mapper.aliasForSystemAttribute("class"); if (attributeName != null) { classAttribute = reader.getAttribute(attributeName); } } return classAttribute; }
Example 2
Source File: XmlMementoSerializer.java From brooklyn-server with Apache License 2.0 | 5 votes |
private static String readClassAttribute(HierarchicalStreamReader reader, Mapper mapper) { String attributeName = mapper.aliasForSystemAttribute("resolves-to"); String classAttribute = attributeName == null ? null : reader.getAttribute(attributeName); if (classAttribute == null) { attributeName = mapper.aliasForSystemAttribute("class"); if (attributeName != null) { classAttribute = reader.getAttribute(attributeName); } } return classAttribute; }