Package civquest.io.xmlSaveGame

Examples of civquest.io.xmlSaveGame.UnsavableDataTypeException


    Encoder encoder = getEncoder(value);
    if (encoder != null) {
      write(key + "=\"" + encoder.getAttributeValueString(value) + "\"");
      writeNewLine();       
    } else {
      throw new UnsavableDataTypeException(value.getClass(),
                         "While processing key " + key + " as an "
                         + "attribute.");
    }
  }
View Full Code Here


    Encoder encoder = getEncoder(value);

    if (encoder != null) {
      encoder.writeElement(key, value);
    } else {
      throw new UnsavableDataTypeException(value.getClass(),
                         "While processing key " + key + " as an "
                         + "element.");
    }
  }
View Full Code Here

      } else if (sameType(memberType, Integer.class)) {
        buffer.append(Defs.getIntegerCode());
      } else {
        String msg = "Can't save a Collection storing " + memberType
          + "as attribute.";
        throw new UnsavableDataTypeException(coll.getClass(), msg);
      }

      for (Object obj : coll) {
        buffer.append(Defs.getSeparator() + (obj == null ? "null" : obj));
      }
View Full Code Here

        return Defs.getArrayListCode();
      } else if (coll instanceof LinkedList) {
        return Defs.getLinkedListCode();
      } else {
        String msg = "Don't know how to save such a Collection. ";
        throw new UnsavableDataTypeException(coll.getClass(), msg);
                          
      }
    }
View Full Code Here

TOP

Related Classes of civquest.io.xmlSaveGame.UnsavableDataTypeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.