Package com.fasterxml.jackson.databind.introspect

Examples of com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder


    public void testSimple()
    {
        POJOPropertiesCollector coll = collector(SimpleBuilder.class, "with");
        Map<String, POJOPropertyBuilder> props = coll.getPropertyMap();
        assertEquals(1, props.size());
        POJOPropertyBuilder prop = props.get("x");
        assertNotNull(prop);
        assertTrue(prop.hasField());
        assertFalse(prop.hasGetter());
        assertTrue(prop.hasSetter());
    }
View Full Code Here


        public List<BeanPropertyWriter> changeProperties(SerializationConfig config,
                BeanDescription beanDesc, List<BeanPropertyWriter> beanProperties)
        {
            JavaType strType = config.constructType(String.class);
            // we need a valid BeanPropertyDefinition; this will do (just need name to match)
            POJOPropertyBuilder prop = new POJOPropertyBuilder(new PropertyName("bogus"), null, true);
            try {
                AnnotatedField f = new AnnotatedField(EmptyBean.class.getDeclaredField("name"), null);
                beanProperties.add(new BeanPropertyWriter(prop, f, null,
                        strType,
                        null, null, strType,
View Full Code Here

                                MapperConfig<?> config) {

    AnnotationIntrospector annotationIntrospector = config.isAnnotationProcessingEnabled()
            ? config.getAnnotationIntrospector()
            : null;
    POJOPropertyBuilder prop = new POJOPropertyBuilder(beanProperty.getName(), annotationIntrospector, true);
    return naming.nameForField(config, prop.getField(), beanProperty.getName());
  }
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder

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.