Examples of BeanPropertyMap


Examples of com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap

              +" has bad return type ("+rawBuildType.getName()
              +"), not compatible with POJO type ("+valueType.getRawClass().getName()+")");
      }
      // And if so, we can try building the deserializer
        Collection<SettableBeanProperty> props = _properties.values();
        BeanPropertyMap propertyMap = new BeanPropertyMap(props);
        propertyMap.assignIndexes();

        boolean anyViews = !_defaultViewInclusion;

        if (!anyViews) {
            for (SettableBeanProperty prop : props) {
                if (prop.hasViews()) {
                    anyViews = true;
                    break;
                }
            }
        }

        if (_objectIdReader != null) {
            ObjectIdValueProperty prop = new ObjectIdValueProperty(_objectIdReader);
            propertyMap = propertyMap.withProperty(prop);
        }
       
        return new BuilderBasedDeserializer(this,
                _beanDesc, propertyMap, _backRefProperties, _ignorableProps, _ignoreAllUnknown,
                anyViews);
View Full Code Here

Examples of com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap

     * information collected.
     */
    public BeanDeserializer build()
    {
        Collection<SettableBeanProperty> props = _properties.values();
        BeanPropertyMap propertyMap = new BeanPropertyMap(props);
        propertyMap.assignIndexes();

        // view processing must be enabled if:
        // (a) fields are not included by default (when deserializing with view), OR
        // (b) one of properties has view(s) to included in defined
        boolean anyViews = !_defaultViewInclusion;

        if (!anyViews) {
            for (SettableBeanProperty prop : props) {
                if (prop.hasViews()) {
                    anyViews = true;
                    break;
                }
            }
        }

        // one more thing: may need to create virtual ObjectId property:
        if (_objectIdReader != null) {
            ObjectIdValueProperty prop = new ObjectIdValueProperty(_objectIdReader);
            propertyMap = propertyMap.withProperty(prop);
        }
       
        return new BeanDeserializer(this,
                _beanDesc, propertyMap, _backRefProperties, _ignorableProps, _ignoreAllUnknown,
                anyViews);
View Full Code Here

Examples of com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap

              +" has bad return type ("+rawBuildType.getName()
              +"), not compatible with POJO type ("+valueType.getRawClass().getName()+")");
      }
      // And if so, we can try building the deserializer
        Collection<SettableBeanProperty> props = _properties.values();
        BeanPropertyMap propertyMap = new BeanPropertyMap(props);
        propertyMap.assignIndexes();

        boolean anyViews = !_defaultViewInclusion;

        if (!anyViews) {
            for (SettableBeanProperty prop : props) {
                if (prop.hasViews()) {
                    anyViews = true;
                    break;
                }
            }
        }

        if (_objectIdReader != null) {
            ObjectIdValueProperty prop = new ObjectIdValueProperty(_objectIdReader);
            propertyMap = propertyMap.withProperty(prop);
        }
       
        return new BuilderBasedDeserializer(this,
                _beanDesc, propertyMap, _backRefProperties, _ignorableProps, _ignoreAllUnknown,
                anyViews);
View Full Code Here

Examples of org.apache.beehive.controls.api.properties.BeanPropertyMap

        if ( extImplBinding == null )
            extImplBinding = _extImplBindings.getProperty( beanClassName );

        if ( extImplBinding != null )
        {
            BeanPropertyMap bpm = props == null ? new BeanPropertyMap( beanClass ) : new BeanPropertyMap( props );
            PropertyKey propKey = new PropertyKey( org.apache.beehive.controls.api.properties.BaseProperties.class,
                                                   "controlImplementation" );

            bpm.setProperty( propKey, extImplBinding );
            props = bpm;
        }

        T ret = null;
        try
View Full Code Here

Examples of org.apache.beehive.controls.api.properties.BeanPropertyMap

    {
        //
        // Return a wrapped copy of the original bean property map, so any edits
        // don't impact the bean properties.
        //
        return new BeanPropertyMap(_bean.getPropertyMap());
    }
View Full Code Here

Examples of org.apache.beehive.controls.api.properties.BeanPropertyMap

            // incrementally compare oldInstance property values to newInstance property values.  
            // Because the bean instance PropertyMap holds only the values that have been
            // modified, this process can be optimized by directly writing out only the properties
            // found in the map.
            //
            BeanPropertyMap beanMap = control.getPropertyMap();
            PropertyDescriptor [] propDescriptors = beanInfo.getPropertyDescriptors();
            for (PropertyKey pk : beanMap.getPropertyKeys())
            {
                //
                // Locate the PropertyDescriptor for the modified property, and use it to write
                // the property value to the encoder stream
                //
                String propName = pk.getPropertyName();
                boolean found = false;
                for (int i = 0; i < propDescriptors.length; i++)
                {
                    if (propName.equals(propDescriptors[i].getName()))
                    {
                        found = true;

                        // Only write the property if it is not flagged as transient
                        Object transientVal = propDescriptors[i].getValue("transient");
                        if (transientVal == null || transientVal.equals(Boolean.FALSE))
                        {
                            xmlOut.writeStatement(
                                new Statement(oldInstance,
                                      propDescriptors[i].getWriteMethod().getName(),
                                      new Object [] {beanMap.getProperty(pk)}));
                        }
                    }
                }
                if (found == false)
                {
View Full Code Here

Examples of org.apache.beehive.controls.api.properties.BeanPropertyMap

            // map, and then create a wrapper map around it for storing per instance
            // properties.
            //
            if (annotElem != controlIntf)
                initProperties.setDelegateMap(classMap);
            _properties = new BeanPropertyMap(initProperties);
        }
        else
        {
            //
            // If no initial map was provided, simply create an empty map wrapping the
            // control class default.
            //
            _properties = new BeanPropertyMap(classMap);
        }

    }
View Full Code Here

Examples of org.apache.beehive.controls.api.properties.BeanPropertyMap

            // incrementally compare oldInstance property values to newInstance property values.  
            // Because the bean instance PropertyMap holds only the values that have been
            // modified, this process can be optimized by directly writing out only the properties
            // found in the map.
            //
            BeanPropertyMap beanMap = control.getPropertyMap();
            PropertyDescriptor [] propDescriptors = beanInfo.getPropertyDescriptors();
            for (PropertyKey pk : beanMap.getPropertyKeys())
            {
                //
                // Locate the PropertyDescriptor for the modified property, and use it to write
                // the property value to the encoder stream
                //
                String propName = pk.getPropertyName();
                boolean found = false;
                for (int i = 0; i < propDescriptors.length; i++)
                {
                    if (propName.equals(propDescriptors[i].getName()))
                    {
                        found = true;

                        // Only write the property if it is not flagged as transient
                        Object transientVal = propDescriptors[i].getValue("transient");
                        if (transientVal == null || transientVal.equals(Boolean.FALSE))
                        {
                            xmlOut.writeStatement(
                                new Statement(oldInstance,
                                      propDescriptors[i].getWriteMethod().getName(),
                                      new Object [] {beanMap.getProperty(pk)}));
                        }
                    }
                }
                if (found == false)
                {
View Full Code Here

Examples of org.apache.beehive.controls.api.properties.BeanPropertyMap

    {
        //
        // Return a wrapped copy of the original bean property map, so any edits
        // don't impact the bean properties.
        //
        return new BeanPropertyMap(_bean.getPropertyMap());
    }
View Full Code Here

Examples of org.apache.beehive.controls.api.properties.BeanPropertyMap

        if ( extImplBinding == null )
            extImplBinding = _extImplBindings.getProperty( beanClassName );

        if ( extImplBinding != null )
        {
            BeanPropertyMap bpm = props == null ? new BeanPropertyMap( beanClass ) : new BeanPropertyMap( props );
            PropertyKey propKey = new PropertyKey(org.apache.beehive.controls.api.properties.BaseProperties.class,
                                                  KEY_CONTROL_IMPLEMENTATION);

            bpm.setProperty( propKey, extImplBinding );
            props = bpm;
        }

        T ret = null;
        try
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.