private HierarchicalStreamDriver getDefaultDriver() { if (this.defaultDriver == null) { this.defaultDriver = new XppDriver(); } return this.defaultDriver; }
/** * Constructs a default XStream. * <p> * The instance will use the {@link XppDriver} as default and tries to determine the best * match for the {@link ReflectionProvider} on its own. * </p> * * @throws InitializationException in case of an initialization problem */ public XStream() { this(null, (Mapper)null, new XppDriver()); }
/** * Constructs an XStream with a special {@link ReflectionProvider}. * <p> * The instance will use the {@link XppDriver} as default. * </p> * * @param reflectionProvider the reflection provider to use or <em>null</em> for best * matching reflection provider * @throws InitializationException in case of an initialization problem */ public XStream(ReflectionProvider reflectionProvider) { this(reflectionProvider, (Mapper)null, new XppDriver()); }
/** * Deserialize a self-contained XStream with object from an XML Reader. The method will use * internally an XppDriver to load the contained XStream instance with default permissions. * * @param xml the {@link Reader} providing the XML data * @throws IOException if an error occurs reading from the Reader. * @throws ClassNotFoundException if a class in the XML stream cannot be found * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized * @since 1.2 * @see #toXML(XStream, Object, Writer) */ public Object fromXML(final Reader xml) throws IOException, ClassNotFoundException { return fromXML(new XppDriver(), xml); }
/** * Deserialize a self-contained XStream with object from an XML Reader. The method will use * internally an XppDriver to load the contained XStream instance. * * @param xml the {@link Reader} providing the XML data * @param permissions the permissions to use (ensure that they include the defaults) * @throws IOException if an error occurs reading from the Reader. * @throws ClassNotFoundException if a class in the XML stream cannot be found * @throws com.thoughtworks.xstream.XStreamException if the object cannot be deserialized * @since 1.4.7 * @see #toXML(XStream, Object, Writer) */ public Object fromXML(final Reader xml, final TypePermission[] permissions) throws IOException, ClassNotFoundException { return fromXML(new XppDriver(), xml, permissions); }
/** * Constructs a default XStream. * <p> * The instance will use the {@link XppDriver} as default and tries to determine the best match for the * {@link ReflectionProvider} on its own. * </p> * * @throws InitializationException in case of an initialization problem */ public XStream() { this(new XppDriver()); }
/** * Constructs an XStream with a special {@link ReflectionProvider}. * <p> * The instance will use the {@link XppDriver} as default. * </p> * * @param reflectionProvider the reflection provider to use or <em>null</em> for best matching reflection provider * @throws InitializationException in case of an initialization problem */ public XStream(final ReflectionProvider reflectionProvider) { this(reflectionProvider, new XppDriver()); }
/** * Constructs a default XStream. The instance will use the {@link XppDriver} as default and tries to determine the best * match for the {@link ReflectionProvider} on its own. * * @throws InitializationException in case of an initialization problem */ public XStream() { this(null, (Mapper)null, new XppDriver()); }
/** * Constructs an XStream with a special {@link ReflectionProvider}. The instance will use the {@link XppDriver} as default. * * @throws InitializationException in case of an initialization problem */ public XStream(ReflectionProvider reflectionProvider) { this(reflectionProvider, (Mapper)null, new XppDriver()); }
/** * Constructs an XStream with a special {@link ReflectionProvider}. The instance will use * the {@link XppDriver} as default. * * @throws InitializationException in case of an initialization problem */ public XStream(ReflectionProvider reflectionProvider) { this(reflectionProvider, (Mapper)null, new XppDriver()); }
static private XStream getXStream() { if (xstream_ == null) { xstream_ = new XStream(new XppDriver()); xstream_.alias("user-profile", UserProfileImpl.class); } return xstream_; } }
public CubaXStream(List<Class> excluded) { this(null, new XppDriver(), new ClassLoaderReference(Thread.currentThread().getContextClassLoader()), null, new CubaXStreamConverterLookup(excluded)); }
/** * Converts the object to an XML string * * @return resulting XML string */ public String toXML() { XStream xstream = new XStream(new XppDriver(new XmlFriendlyReplacer( "$", "_"))); setXstreamProps(xstream); return xstream.toXML(this); }
/** * Converts the object to an XML string * * @return resulting XML string */ public String toXML() { XStream xstream = new XStream(new XppDriver(new XmlFriendlyReplacer( "$", "_"))); this.setXstreamProps(xstream); return xstream.toXML(this); }
/** * Converts the Component object to an XML string * * @return componentXML : the resulting XML string */ public String toXML() { XStream xstream = new XStream(new XppDriver(new XmlFriendlyReplacer( "$", "_"))); setXstreamProps(xstream); return xstream.toXML(this); }
public String toString() { XStream xstream = new XStream(new XppDriver(new NoNameCoder())); xstream.setMode(XStream.NO_REFERENCES); xstream.processAnnotations(getClass()); return xstream.toXML(this); }
public String toString() { XStream xstream = new XStream(new XppDriver(new NoNameCoder())); xstream.setMode(XStream.NO_REFERENCES); xstream.processAnnotations(getClass()); return xstream.toXML(this); } }
public String toString() { XStream xstream = new XStream(new XppDriver(new NoNameCoder())); xstream.setMode(XStream.NO_REFERENCES); xstream.processAnnotations(getClass()); return xstream.toXML(this); }
private static XStream createXStream() { XStream xstream = new XStream(new PureJavaReflectionProvider(),new XppDriver(), new ClassLoaderReference(Thread.currentThread().getContextClassLoader())); xstream.registerConverter(new JavaBeanConverter(xstream.getMapper())); return xstream; }
/** * Construtor. * */ public XStreamSesc() { super(new XppDriver(new NoNameCoder())); autodetectAnnotations(true); registerConverter(new LongConverter()); registerConverter(new IntegerConverter()); }