Examples of asObject()


Examples of org.jboss.dmr.client.ModelNode.asObject()

                            else {
                                // workaround ...
                                if (!result.hasDefined(RESULT)) {
                                    Console.warning("Failed to read resource description" + address);
                                } else {
                                    desc = result.asObject();
                                }
                            }

                            if (desc != null) {
View Full Code Here

Examples of org.jboss.dmr.client.ModelNode.asObject()

                            else {
                                // workaround ...
                                if (!result.hasDefined(RESULT)) {
                                    Console.warning("Failed to read resource description" + address);
                                } else {
                                    desc = result.asObject();
                                }
                            }

                            if (desc != null) {
View Full Code Here

Examples of org.jboss.dmr.client.ModelNode.asObject()

    }

    @Override
    public void initialLoad() {
        ModelNode address = Baseadress.get();
        if (address.asObject().get("profile").isDefined()) {
            Feedback.alert("OSGi Subsystem", "OSGi Subsystem runtime information is not available on the profile level.");
            return;
        }

        bundles.initialLoad();
View Full Code Here

Examples of org.nustaq.serialization.FSTConfiguration.asObject()

        FSTConfiguration conf = FSTConfiguration.createDefaultConfiguration();
        conf.registerClass(Versioning.class);

        byte[] bytes = conf.asByteArray(v);
        Versioning res = (Versioning) conf.asObject(bytes);

        assertTrue(DeepEquals.deepEquals(v,res));


        FSTConfiguration old = FSTConfiguration.createDefaultConfiguration();
View Full Code Here

Examples of org.nustaq.serialization.FSTConfiguration.asObject()

    @Test
    public void testExternalizableOverride() {
        FSTConfiguration conf = FSTConfiguration.createDefaultConfiguration();
        Object original[] = {"A", new SubClassedAList().$("A").$("B").$("C"), "Ensure stream not corrupted" };
        Object deser = conf.asObject(conf.asByteArray(original));
        assertTrue( DeepEquals.deepEquals(original, deser) );
    }

    static class NotSer {
        int x;
View Full Code Here

Examples of org.nustaq.serialization.FSTConfiguration.asObject()

    @Test
    public void testNotSerializable() {
        FSTConfiguration conf = FSTConfiguration.createDefaultConfiguration().setForceSerializable(true);
        NotSer ser = new NotSer(11,12);
        assertTrue(DeepEquals.deepEquals(ser, conf.asObject(conf.asByteArray(ser))) );
        NotSerSub sersub = new NotSerSub(11,12);
        final Object deser = conf.asObject(conf.asByteArray(sersub));
        assertTrue(DeepEquals.deepEquals(sersub, deser) );
        assertTrue(((NotSerSub) deser).pubConsCalled);
    }
View Full Code Here

Examples of org.nustaq.serialization.FSTConfiguration.asObject()

    public void testNotSerializable() {
        FSTConfiguration conf = FSTConfiguration.createDefaultConfiguration().setForceSerializable(true);
        NotSer ser = new NotSer(11,12);
        assertTrue(DeepEquals.deepEquals(ser, conf.asObject(conf.asByteArray(ser))) );
        NotSerSub sersub = new NotSerSub(11,12);
        final Object deser = conf.asObject(conf.asByteArray(sersub));
        assertTrue(DeepEquals.deepEquals(sersub, deser) );
        assertTrue(((NotSerSub) deser).pubConsCalled);
    }

View Full Code Here

Examples of org.nustaq.serialization.FSTConfiguration.asObject()

    // 1. serialize
    FSTConfiguration config = FSTConfiguration.createDefaultConfiguration();
    byte[] data2 = config.asByteArray(object);

    // 2. deserialize
    ExternalizableTestClass object2 = (ExternalizableTestClass) config.asObject(data2);

    Assert.assertEquals(1, object2.getInteger());
  }

}
View Full Code Here

Examples of org.springframework.core.Constants.asObject()

      if (IGNORED_WRITE_CONCERNS.contains(constantName)) {
        continue;
      }

      WriteConcern writeConcern = (WriteConcern) constants.asObject(constantName);
      mongo.setWriteConcern(writeConcern);

      setupCollections();

      callback.doWithWriteConcern(constantName, writeConcern);
View Full Code Here

Examples of org.vertx.java.core.json.JsonElement.asObject()

  public ChangeAwareJsonElement getElement(String fieldName) {
      JsonElement value = inner.getElement(fieldName);
      if (value.isArray()) {
        return convertJsonArray(value.asArray());
      } else {
        return convertJsonObject(value.asObject());
      }
    }

  public Number getNumber(String fieldName) {
      return inner.getNumber(fieldName);
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.