本文整理匯總了Java中net.sf.freecol.common.io.FreeColXMLReader.lookup方法的典型用法代碼示例。如果您正苦於以下問題:Java FreeColXMLReader.lookup方法的具體用法?Java FreeColXMLReader.lookup怎麽用?Java FreeColXMLReader.lookup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.sf.freecol.common.io.FreeColXMLReader
的用法示例。
在下文中一共展示了FreeColXMLReader.lookup方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: readChildren
import net.sf.freecol.common.io.FreeColXMLReader; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
@Override
protected void readChildren(FreeColXMLReader xr) throws XMLStreamException {
// Clear containers.
NameCache.clearCitiesOfCibola();
players.clear();
unknownEnemy = null;
// The current player is special. Defer lookup of the current
// player tag until we read the children, because that is
// where the players are defined.
String current = xr.getAttribute(CURRENT_PLAYER_TAG, (String)null);
super.readChildren(xr);
currentPlayer = xr.lookup(this, current, Player.class);
// Make sure all work locations have rational default production
// now that all tiles are defined.
for (Colony c : getAllColoniesList(null)) {
c.updateProductionTypes();
}
}