Package com.tangosol.io.pof.reflect

Examples of com.tangosol.io.pof.reflect.ComplexPofValue


        Binary blob = ExternalizableHelper.toBinary(new TypeA(), ctx);
        PofValue root = PofValueParser.parse(blob, ctx);
   
        Assert.assertTrue(root instanceof ComplexPofValue);
       
        ComplexPofValue cf = (ComplexPofValue) root;
        @SuppressWarnings("unused")
    PofValue p0 = cf.getChild(0);
        PofValue p1 = cf.getChild(1);
        PofValue p2 = cf.getChild(2);
        PofValue p3 = cf.getChild(3);
        PofValue p4 = cf.getChild(4);
        PofValue p5 = cf.getChild(5);
        PofValue p6 = cf.getChild(6);
        @SuppressWarnings("unused")
        PofValue p7 = cf.getChild(6);
       
        Assert.assertEquals("ABC", p1.getValue(String.class));
        Assert.assertEquals("", p2.getValue(String.class));
        Assert.assertEquals(null, p3.getValue(String.class));
        Assert.assertEquals(10, p4.getValue(Integer.class));
View Full Code Here


            if (! (cursor instanceof ComplexPofValue)) {
                valueOut[0] = cursor.getValue();
                return path;
            }
            else {
                ComplexPofValue cv = (ComplexPofValue) cursor;
                if (cv.getTypeId() > 0) {
                    PofSerializer codec = cv.getPofContext().getPofSerializer(cursor.getTypeId());
                    if (codec instanceof ReflectionPofSerializer) {
                        return ((ReflectionPofSerializer) codec).extract(cursor, path, valueOut);
                    }
                    else {
                        valueOut[0] = cursor.getValue();
View Full Code Here

            out.writeString(0, objectRef);           
        }
    }

    public String extract(PofValue cursor, String path, Object[] valueOut) throws IOException {
        ComplexPofValue cv = (ComplexPofValue) cursor;
        Class<?> type = cv.getPofContext().getClass(cv.getTypeId());
        if (type == null || type == Void.class) {
            throw new NullPointerException("value is null, failed to follow [" + path + "]");
        }
       
        ObjectFormat format;
View Full Code Here

TOP

Related Classes of com.tangosol.io.pof.reflect.ComplexPofValue

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.