Package com.thoughtworks.xstream

Examples of com.thoughtworks.xstream.XStream.aliasField()


    xstream.aliasField("error", SBMLErrorLog.class, "status");
    xstream.aliasField("warning", SBMLErrorLog.class, "status");
    xstream.aliasField("no-errors", SBMLErrorLog.class, "status");
    xstream.aliasField("file-not-readable", SBMLErrorLog.class, "status");
    xstream.aliasField("out-of-memory", SBMLErrorLog.class, "status");
    xstream.aliasField("segmentation-fault", SBMLErrorLog.class, "status");
    xstream.aliasField("internal-error", SBMLErrorLog.class, "status");

    xstream.useAttributeFor(File.class);

    xstream.useAttributeFor(Option.class, "name");
View Full Code Here


    xstream.aliasField("warning", SBMLErrorLog.class, "status");
    xstream.aliasField("no-errors", SBMLErrorLog.class, "status");
    xstream.aliasField("file-not-readable", SBMLErrorLog.class, "status");
    xstream.aliasField("out-of-memory", SBMLErrorLog.class, "status");
    xstream.aliasField("segmentation-fault", SBMLErrorLog.class, "status");
    xstream.aliasField("internal-error", SBMLErrorLog.class, "status");

    xstream.useAttributeFor(File.class);

    xstream.useAttributeFor(Option.class, "name");
    xstream.useAttributeFor(Option.class, "status");
View Full Code Here

    public void testUseAliasInheritedFields() {
        XStream xstream = new XStream();
        xstream.registerConverter(
            new JavaBeanConverter(xstream.getMapper(), new BeanProvider(
                new StringComparator())), XStream.PRIORITY_VERY_LOW);
        xstream.aliasField("first-name", Person.class, "firstName");
        xstream.aliasField("last-name", Person.class, "lastName");
        xstream.alias("man", Man.class);

        Man man = new Man("John", "Doe");
        String expected = ""
View Full Code Here

        XStream xstream = new XStream();
        xstream.registerConverter(
            new JavaBeanConverter(xstream.getMapper(), new BeanProvider(
                new StringComparator())), XStream.PRIORITY_VERY_LOW);
        xstream.aliasField("first-name", Person.class, "firstName");
        xstream.aliasField("last-name", Person.class, "lastName");
        xstream.alias("man", Man.class);

        Man man = new Man("John", "Doe");
        String expected = ""
            + "<man>\n"
View Full Code Here

    }
   
    public void testCanAliasField() {
        XStream xstream = new XStream();
        xstream.alias("simple", SimpleType.class);
        xstream.aliasField("s2", SimpleType.class, "two");
       
        String expected = ""
            + "<simple serialization=\"custom\">\n"
            + "  <simple>\n"
            + "    <default>\n"
View Full Code Here

    }

    public void testCanAliasNamedField() {
        XStream xstream = new XStream();
        xstream.alias("simple", SimpleNamedFieldsType.class);
        xstream.aliasField("two", SimpleNamedFieldsType.class, "s2");
       
        String expected = ""
            + "<simple serialization=\"custom\">\n"
            + "  <simple>\n"
            + "    <default>\n"
View Full Code Here

    xstream.alias( "server-info", ServerInfo.class);
    xstream.alias( "port-forwarding", PortForwarding.class );
    xstream.alias( "host-key", HostKey.class );
    xstream.alias( "server-link", ServerLink.class );

    xstream.aliasField( "server-infos", DefaultShellConfiguration.class, "serverInfo");
    xstream.aliasField( "host-keys", DefaultShellConfiguration.class, "hostKeys");
    xstream.aliasField( "check-host-key", ServerInfo.class, "checkHostKey");
    xstream.aliasField( "port-forwardings", ServerInfo.class, "portForwardings");
    xstream.aliasField( "local-port", ServerLink.class, "localPort");
    xstream.aliasField( "remote-host", PortForwarding.class, "remoteHost");
View Full Code Here

    xstream.alias( "port-forwarding", PortForwarding.class );
    xstream.alias( "host-key", HostKey.class );
    xstream.alias( "server-link", ServerLink.class );

    xstream.aliasField( "server-infos", DefaultShellConfiguration.class, "serverInfo");
    xstream.aliasField( "host-keys", DefaultShellConfiguration.class, "hostKeys");
    xstream.aliasField( "check-host-key", ServerInfo.class, "checkHostKey");
    xstream.aliasField( "port-forwardings", ServerInfo.class, "portForwardings");
    xstream.aliasField( "local-port", ServerLink.class, "localPort");
    xstream.aliasField( "remote-host", PortForwarding.class, "remoteHost");
    xstream.aliasField( "remote-port", PortForwarding.class, "remotePort");
View Full Code Here

    xstream.alias( "host-key", HostKey.class );
    xstream.alias( "server-link", ServerLink.class );

    xstream.aliasField( "server-infos", DefaultShellConfiguration.class, "serverInfo");
    xstream.aliasField( "host-keys", DefaultShellConfiguration.class, "hostKeys");
    xstream.aliasField( "check-host-key", ServerInfo.class, "checkHostKey");
    xstream.aliasField( "port-forwardings", ServerInfo.class, "portForwardings");
    xstream.aliasField( "local-port", ServerLink.class, "localPort");
    xstream.aliasField( "remote-host", PortForwarding.class, "remoteHost");
    xstream.aliasField( "remote-port", PortForwarding.class, "remotePort");
    xstream.aliasField( "local-port", PortForwarding.class, "localPort");
View Full Code Here

    xstream.alias( "server-link", ServerLink.class );

    xstream.aliasField( "server-infos", DefaultShellConfiguration.class, "serverInfo");
    xstream.aliasField( "host-keys", DefaultShellConfiguration.class, "hostKeys");
    xstream.aliasField( "check-host-key", ServerInfo.class, "checkHostKey");
    xstream.aliasField( "port-forwardings", ServerInfo.class, "portForwardings");
    xstream.aliasField( "local-port", ServerLink.class, "localPort");
    xstream.aliasField( "remote-host", PortForwarding.class, "remoteHost");
    xstream.aliasField( "remote-port", PortForwarding.class, "remotePort");
    xstream.aliasField( "local-port", PortForwarding.class, "localPort");
    xstream.aliasField( "host-string", HostKey.class, "hostString");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.