Package org.apache.pivot.beans

Examples of org.apache.pivot.beans.BeanAdapter.containsKey()


        DefaultProperty defaultProperty = container.getClass().getAnnotation(DefaultProperty.class);
        if (defaultProperty != null) {
            TreeBranch branch = new TreeBranch(nameForObject(container));
            String defaultPropertyName = defaultProperty.value();
            BeanAdapter beanAdapter = new BeanAdapter(container);
            if (!beanAdapter.containsKey(defaultPropertyName)) {
                throw new IllegalStateException("default property " + defaultPropertyName
                    + " not found on " + container);
            }
            Object defaultPropertyValue = beanAdapter.get(defaultPropertyName);
            if (defaultPropertyValue != null) {
View Full Code Here


        DefaultProperty defaultProperty = container.getClass().getAnnotation(DefaultProperty.class);
        if (defaultProperty != null) {
            TreeBranch branch = new TreeBranch(nameForObject(container));
            String defaultPropertyName = defaultProperty.value();
            BeanAdapter beanAdapter = new BeanAdapter(container);
            if (!beanAdapter.containsKey(defaultPropertyName)) {
                throw new IllegalStateException("default property " + defaultPropertyName
                    + " not found on " + container);
            }
            Object defaultPropertyValue = beanAdapter.get(defaultPropertyName);
            if (defaultPropertyValue != null) {
View Full Code Here

            }

            String key = keys.get(i);

            BeanAdapter beanAdapter = new BeanAdapter(value);
            if (beanAdapter.containsKey(key)) {
                value = beanAdapter.get(key);
            } else if (value instanceof Sequence<?>) {
                Sequence<Object> sequence = (Sequence<Object>)value;
                value = sequence.get(Integer.parseInt(key));
            } else if (value instanceof Dictionary<?, ?>) {
View Full Code Here

        }

        BeanAdapter beanAdapter = new BeanAdapter(parent);

        Object previousValue;
        if (beanAdapter.containsKey(key)) {
            previousValue = beanAdapter.put(key, value);
        } else if (parent instanceof Sequence<?>) {
            Sequence<Object> sequence = (Sequence<Object>)parent;
            previousValue = sequence.update(Integer.parseInt(key), value);
        } else if (parent instanceof Dictionary<?, ?>) {
View Full Code Here

        boolean containsKey;
        if (parent == null) {
            containsKey = false;
        } else {
            BeanAdapter beanAdapter = new BeanAdapter(parent);
            containsKey = beanAdapter.containsKey(key);

            if (!containsKey) {
                if (parent instanceof Sequence<?>) {
                    Sequence<Object> sequence = (Sequence<Object>)parent;
                    containsKey = (sequence.getLength() > Integer.parseInt(key));
View Full Code Here

        DefaultProperty defaultProperty = container.getClass().getAnnotation(DefaultProperty.class);
        if (defaultProperty != null) {
            TreeBranch branch = new TreeBranch(nameForObject(container));
            String defaultPropertyName = defaultProperty.value();
            BeanAdapter beanAdapter = new BeanAdapter(container);
            if (!beanAdapter.containsKey(defaultPropertyName)) {
                throw new IllegalStateException("default property " + defaultPropertyName
                    + " not found on " + container);
            }
            Object defaultPropertyValue = beanAdapter.get(defaultPropertyName);
            if (defaultPropertyValue != null) {
View Full Code Here

                        if (interfaceMethodName.endsWith(PROPERTY_CHANGE_SUFFIX)) {
                            String propertyName = interfaceMethodName.substring(0,
                                interfaceMethodName.length() - PROPERTY_CHANGE_SUFFIX.length());

                            if (beanAdapter.containsKey(propertyName)) {
                                notifyingProperties.add(propertyName);
                            }
                        }
                    }
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.