Examples of containedType()


Examples of org.codehaus.jackson.type.JavaType.containedType()

        // and then custom generic type as well
        JavaType custom = tf.constructParametricType(SingleArgGeneric.class, String.class);
        assertEquals(SimpleType.class, custom.getClass());
        assertEquals(1, custom.containedTypeCount());
        assertEquals(strC, custom.containedType(0));
        assertNull(custom.containedType(1));
        // should also be able to access variable name:
        assertEquals("X", custom.containedTypeName(0));

        // And finally, ensure that we can't create invalid combinations
View Full Code Here

Examples of org.codehaus.jackson.type.JavaType.containedType()

        // and then custom generic type as well
        JavaType custom = tf.constructParametricType(SingleArgGeneric.class, String.class);
        assertEquals(SimpleType.class, custom.getClass());
        assertEquals(1, custom.containedTypeCount());
        assertEquals(strC, custom.containedType(0));
        assertNull(custom.containedType(1));
        // should also be able to access variable name:
        assertEquals("X", custom.containedTypeName(0));

        // And finally, ensure that we can't create invalid combinations
        try {
View Full Code Here

Examples of org.codehaus.jackson.type.JavaType.containedType()

        if (am.hasAnnotation(ObjectId.class)) {
            JavaType type = deserializationConfig.getTypeFactory().constructType(am.getGenericType());
            if (type.isCollectionLikeType()) {
                return findObjectIdDeserializer(type.containedType(0));
            } else if (type.isMapLikeType()) {
                return findObjectIdDeserializer(type.containedType(1));
            }
        }
        return null;
    }
View Full Code Here

Examples of org.codehaus.jackson.type.JavaType.containedType()

                    return null;
                }
            } else {
                dbRefType = type;
            }
            Class<? extends JsonDeserializer> keyDeserializer = introspector.findObjectIdDeserializer(dbRefType.containedType(1));
            return new DBRefDeserializer(dbRefType.containedType(0), dbRefType.containedType(1), ClassUtil.createInstance(keyDeserializer, false));
        }
        return null;
    }
View Full Code Here

Examples of org.codehaus.jackson.type.JavaType.containedType()

                }
            } else {
                dbRefType = type;
            }
            Class<? extends JsonDeserializer> keyDeserializer = introspector.findObjectIdDeserializer(dbRefType.containedType(1));
            return new DBRefDeserializer(dbRefType.containedType(0), dbRefType.containedType(1), ClassUtil.createInstance(keyDeserializer, false));
        }
        return null;
    }

    @Override
View Full Code Here

Examples of org.codehaus.jackson.type.JavaType.containedType()

                }
            } else {
                dbRefType = type;
            }
            Class<? extends JsonDeserializer> keyDeserializer = introspector.findObjectIdDeserializer(dbRefType.containedType(1));
            return new DBRefDeserializer(dbRefType.containedType(0), dbRefType.containedType(1), ClassUtil.createInstance(keyDeserializer, false));
        }
        return null;
    }

    @Override
View Full Code Here

Examples of org.codehaus.jackson.type.JavaType.containedType()

    @Override
    public Class findContentDeserializer(Annotated am) {
        if (am.hasAnnotation(ObjectId.class)) {
            JavaType type = deserializationConfig.getTypeFactory().constructType(am.getGenericType());
            if (type.isCollectionLikeType()) {
                return findObjectIdDeserializer(type.containedType(0));
            } else if (type.isMapLikeType()) {
                return findObjectIdDeserializer(type.containedType(1));
            }
        }
        return null;
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.