/** * Convert to a string. */ public static String objectToXML(Object val, ClassLoader classloader) { return objectToXML(val, classloader, null); }
/** * Convert message to a string. * @param message The message. */ public String encodeMessage(Map message) { String msg = JavaWriter.objectToXML(message, null); // Todo: classloader!? return msg; }
/** * Convert message to a string. * @param message The message. */ public String encodeMessage(Map message) { String msg = JavaWriter.objectToXML(message, null); // Todo: classloader!? return msg; }
os.write(JavaWriter.objectToXML(getHighscore(),this.getClass().getClassLoader())); os.close();
str = JavaWriter.objectToXML(data, ArrayTest.class.getClassLoader()); time = System.nanoTime() - start; System.out.println("encoding to XML took "+(time/1000000)+" milliseconds");
/** * Write current state into properties. */ public IFuture<Properties> getProperties() { Properties props = new Properties(); if(currentperspective!=null) { props.addProperty(new Property("perspective", currentperspective.getName())); consoleheights.put(currentperspective.getName()+".console.height", Double.valueOf(getConsoleHeight())); } props.addProperty(new Property("consoleenabled", consoleenabled ? "true" : "false")); props.addProperty(new Property("consoleheights", JavaWriter.objectToXML(consoleheights, getClass().getClassLoader()))); return new Future<Properties>(props); }
/** * Write current state into properties. */ public IFuture<Properties> getProperties() { Properties props = new Properties(); if(currentperspective!=null) { props.addProperty(new Property("perspective", currentperspective.getName())); consoleheights.put(currentperspective.getName()+".console.height", Double.valueOf(getConsoleHeight())); } props.addProperty(new Property("consoleenabled", consoleenabled ? "true" : "false")); props.addProperty(new Property("consoleheights", JavaWriter.objectToXML(consoleheights, getClass().getClassLoader()))); return new Future<Properties>(props); }
String treesave = JavaWriter.objectToXML(mep, getClass().getClassLoader()); // Doesn't support inner classes: ModelExplorer$ModelExplorerProperties props.addProperty(new Property("tree", treesave));