本文整理汇总了Java中net.sf.freecol.common.io.FreeColXMLReader.getAttributeMap方法的典型用法代码示例。如果您正苦于以下问题:Java FreeColXMLReader.getAttributeMap方法的具体用法?Java FreeColXMLReader.getAttributeMap怎么用?Java FreeColXMLReader.getAttributeMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.freecol.common.io.FreeColXMLReader
的用法示例。
在下文中一共展示了FreeColXMLReader.getAttributeMap方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ObjectMessage
import net.sf.freecol.common.io.FreeColXMLReader; //导入方法依赖的package包/类
/**
* Create a new {@code AttributeMessage} from a stream.
*
* @param type The message type.
* @param xr The {@code FreeColXMLReader} to read from.
* @param attributes The attributes to read.
* @exception XMLStreamException if the stream is corrupt.
*/
protected ObjectMessage(String type, FreeColXMLReader xr,
String... attributes)
throws XMLStreamException {
super(type, xr.getAttributeMap(attributes));
this.objects.clear();
}
示例2: AttributeMessage
import net.sf.freecol.common.io.FreeColXMLReader; //导入方法依赖的package包/类
/**
* Create a new {@code AttributeMessage} from a stream.
*
* Should only be called by direct subclasses of AttributeMessage
* as the entire message is consumed.
*
* @param type The message type.
* @param xr The {@code FreeColXMLReader} to read from.
* @param attributes The attributes to read.
* @exception XMLStreamException if the stream is corrupt.
*/
protected AttributeMessage(String type, FreeColXMLReader xr,
String... attributes)
throws XMLStreamException {
this(type, xr.getAttributeMap(attributes));
xr.closeTag(type);
}