Package com.sun.grid.jgdi.configuration.reflect

Examples of com.sun.grid.jgdi.configuration.reflect.SimplePropertyDescriptor


            } else if (!GEObject.class.isAssignableFrom(propDescr.getBeanClass())) {
                throw new IllegalArgumentException("Invalid Path: property " + propertyName + " in object " + root.getName() + " is not a GEObject");
            } else {
                GEObject child = null;
                if (propDescr instanceof SimplePropertyDescriptor) {
                    SimplePropertyDescriptor spd = (SimplePropertyDescriptor) propDescr;
                    child = (GEObject) spd.getValue(root);
                } else if (propDescr instanceof ListPropertyDescriptor) {
                    ListPropertyDescriptor lpd = (ListPropertyDescriptor) propDescr;
                    int propCount = lpd.getCount(root);
                    GEObject tmpChild = null;
                    for (int i = 0; i < propCount; i++) {
View Full Code Here


                PropertyDescriptor pd = cd.getProperty(i);
                String propPath = path + pd.getPropertyName();
               
                if (pd instanceof SimplePropertyDescriptor) {
                   
                    SimplePropertyDescriptor spd = (SimplePropertyDescriptor) pd;
                   
                    Object v1 = spd.getValue(obj1);
                    Object v2 = spd.getValue(obj2);
                   
                    if (v1 == null && v2 == null) {
                        // no difference
                    } else if (v1 == null && v2 != null) {
                        differences.add(new Difference(propPath, "LPD: missing in obj1 (" + v2 + ")"));
                    } else if (v1 != null && v2 == null) {
                        differences.add(new Difference(propPath, "LPD: missing in obj2 (" + v1 + ")"));
                    } else {
                        if (GEObject.class.isAssignableFrom(spd.getPropertyType())) {
                            getDifferences((GEObject) v1, (GEObject) v2, propPath + ".", differences);
                        } else {
                            if (!v1.equals(v2)) {
                                differences.add(new Difference(propPath, v1 + " != " + v2));
                            }
View Full Code Here

TOP

Related Classes of com.sun.grid.jgdi.configuration.reflect.SimplePropertyDescriptor

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.