Java Code Examples for java.beans.PropertyDescriptor#isConstrained()
The following examples show how to use
java.beans.PropertyDescriptor#isConstrained() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: blog_demos File: ExtendedBeanInfo.java License: Apache License 2.0 | 6 votes |
/** * Compare the given {@link PropertyDescriptor} against the given {@link Object} and * return {@code true} if they are objects are equivalent, i.e. both are {@code * PropertyDescriptor}s whose read method, write method, property types, property * editor and flags are equivalent. * @see PropertyDescriptor#equals(Object) */ public static boolean equals(PropertyDescriptor pd1, Object obj) { if (pd1 == obj) { return true; } if (obj != null && obj instanceof PropertyDescriptor) { PropertyDescriptor pd2 = (PropertyDescriptor) obj; if (!compareMethods(pd1.getReadMethod(), pd2.getReadMethod())) { return false; } if (!compareMethods(pd1.getWriteMethod(), pd2.getWriteMethod())) { return false; } if (pd1.getPropertyType() == pd2.getPropertyType() && pd1.getPropertyEditorClass() == pd2.getPropertyEditorClass() && pd1.isBound() == pd2.isBound() && pd1.isConstrained() == pd2.isConstrained()) { return true; } } return false; }
Example 2
Source Project: spring-analysis-note File: PropertyDescriptorUtils.java License: MIT License | 5 votes |
/** * Compare the given {@code PropertyDescriptors} and return {@code true} if * they are equivalent, i.e. their read method, write method, property type, * property editor and flags are equivalent. * @see java.beans.PropertyDescriptor#equals(Object) */ public static boolean equals(PropertyDescriptor pd, PropertyDescriptor otherPd) { return (ObjectUtils.nullSafeEquals(pd.getReadMethod(), otherPd.getReadMethod()) && ObjectUtils.nullSafeEquals(pd.getWriteMethod(), otherPd.getWriteMethod()) && ObjectUtils.nullSafeEquals(pd.getPropertyType(), otherPd.getPropertyType()) && ObjectUtils.nullSafeEquals(pd.getPropertyEditorClass(), otherPd.getPropertyEditorClass()) && pd.isBound() == otherPd.isBound() && pd.isConstrained() == otherPd.isConstrained()); }
Example 3
Source Project: dragonwell8_jdk File: Test4634390.java License: GNU General Public License v2.0 | 5 votes |
private static boolean compare(PropertyDescriptor pd1, PropertyDescriptor pd2) { if (!compare(pd1.getReadMethod(), pd2.getReadMethod())) { System.out.println("read methods not equal"); return false; } if (!compare(pd1.getWriteMethod(), pd2.getWriteMethod())) { System.out.println("write methods not equal"); return false; } if (pd1.getPropertyType() != pd2.getPropertyType()) { System.out.println("property type not equal"); return false; } if (pd1.getPropertyEditorClass() != pd2.getPropertyEditorClass()) { System.out.println("property editor class not equal"); return false; } if (pd1.isBound() != pd2.isBound()) { System.out.println("bound value not equal"); return false; } if (pd1.isConstrained() != pd2.isConstrained()) { System.out.println("constrained value not equal"); return false; } return true; }
Example 4
Source Project: TencentKona-8 File: Test4634390.java License: GNU General Public License v2.0 | 5 votes |
private static boolean compare(PropertyDescriptor pd1, PropertyDescriptor pd2) { if (!compare(pd1.getReadMethod(), pd2.getReadMethod())) { System.out.println("read methods not equal"); return false; } if (!compare(pd1.getWriteMethod(), pd2.getWriteMethod())) { System.out.println("write methods not equal"); return false; } if (pd1.getPropertyType() != pd2.getPropertyType()) { System.out.println("property type not equal"); return false; } if (pd1.getPropertyEditorClass() != pd2.getPropertyEditorClass()) { System.out.println("property editor class not equal"); return false; } if (pd1.isBound() != pd2.isBound()) { System.out.println("bound value not equal"); return false; } if (pd1.isConstrained() != pd2.isConstrained()) { System.out.println("constrained value not equal"); return false; } return true; }
Example 5
Source Project: java-technology-stack File: PropertyDescriptorUtils.java License: MIT License | 5 votes |
/** * Compare the given {@code PropertyDescriptors} and return {@code true} if * they are equivalent, i.e. their read method, write method, property type, * property editor and flags are equivalent. * @see java.beans.PropertyDescriptor#equals(Object) */ public static boolean equals(PropertyDescriptor pd, PropertyDescriptor otherPd) { return (ObjectUtils.nullSafeEquals(pd.getReadMethod(), otherPd.getReadMethod()) && ObjectUtils.nullSafeEquals(pd.getWriteMethod(), otherPd.getWriteMethod()) && ObjectUtils.nullSafeEquals(pd.getPropertyType(), otherPd.getPropertyType()) && ObjectUtils.nullSafeEquals(pd.getPropertyEditorClass(), otherPd.getPropertyEditorClass()) && pd.isBound() == otherPd.isBound() && pd.isConstrained() == otherPd.isConstrained()); }
Example 6
Source Project: jdk8u60 File: Test4634390.java License: GNU General Public License v2.0 | 5 votes |
private static boolean compare(PropertyDescriptor pd1, PropertyDescriptor pd2) { if (!compare(pd1.getReadMethod(), pd2.getReadMethod())) { System.out.println("read methods not equal"); return false; } if (!compare(pd1.getWriteMethod(), pd2.getWriteMethod())) { System.out.println("write methods not equal"); return false; } if (pd1.getPropertyType() != pd2.getPropertyType()) { System.out.println("property type not equal"); return false; } if (pd1.getPropertyEditorClass() != pd2.getPropertyEditorClass()) { System.out.println("property editor class not equal"); return false; } if (pd1.isBound() != pd2.isBound()) { System.out.println("bound value not equal"); return false; } if (pd1.isConstrained() != pd2.isConstrained()) { System.out.println("constrained value not equal"); return false; } return true; }
Example 7
Source Project: openjdk-jdk8u File: Test4634390.java License: GNU General Public License v2.0 | 5 votes |
private static boolean compare(PropertyDescriptor pd1, PropertyDescriptor pd2) { if (!compare(pd1.getReadMethod(), pd2.getReadMethod())) { System.out.println("read methods not equal"); return false; } if (!compare(pd1.getWriteMethod(), pd2.getWriteMethod())) { System.out.println("write methods not equal"); return false; } if (pd1.getPropertyType() != pd2.getPropertyType()) { System.out.println("property type not equal"); return false; } if (pd1.getPropertyEditorClass() != pd2.getPropertyEditorClass()) { System.out.println("property editor class not equal"); return false; } if (pd1.isBound() != pd2.isBound()) { System.out.println("bound value not equal"); return false; } if (pd1.isConstrained() != pd2.isConstrained()) { System.out.println("constrained value not equal"); return false; } return true; }
Example 8
Source Project: lams File: PropertyDescriptorUtils.java License: GNU General Public License v2.0 | 5 votes |
/** * Compare the given {@code PropertyDescriptors} and return {@code true} if * they are equivalent, i.e. their read method, write method, property type, * property editor and flags are equivalent. * @see java.beans.PropertyDescriptor#equals(Object) */ public static boolean equals(PropertyDescriptor pd, PropertyDescriptor otherPd) { return (ObjectUtils.nullSafeEquals(pd.getReadMethod(), otherPd.getReadMethod()) && ObjectUtils.nullSafeEquals(pd.getWriteMethod(), otherPd.getWriteMethod()) && ObjectUtils.nullSafeEquals(pd.getPropertyType(), otherPd.getPropertyType()) && ObjectUtils.nullSafeEquals(pd.getPropertyEditorClass(), otherPd.getPropertyEditorClass()) && pd.isBound() == otherPd.isBound() && pd.isConstrained() == otherPd.isConstrained()); }
Example 9
Source Project: openjdk-jdk8u-backup File: Test4634390.java License: GNU General Public License v2.0 | 5 votes |
private static boolean compare(PropertyDescriptor pd1, PropertyDescriptor pd2) { if (!compare(pd1.getReadMethod(), pd2.getReadMethod())) { System.out.println("read methods not equal"); return false; } if (!compare(pd1.getWriteMethod(), pd2.getWriteMethod())) { System.out.println("write methods not equal"); return false; } if (pd1.getPropertyType() != pd2.getPropertyType()) { System.out.println("property type not equal"); return false; } if (pd1.getPropertyEditorClass() != pd2.getPropertyEditorClass()) { System.out.println("property editor class not equal"); return false; } if (pd1.isBound() != pd2.isBound()) { System.out.println("bound value not equal"); return false; } if (pd1.isConstrained() != pd2.isConstrained()) { System.out.println("constrained value not equal"); return false; } return true; }
Example 10
Source Project: openjdk-jdk9 File: Test4634390.java License: GNU General Public License v2.0 | 5 votes |
private static boolean compare(PropertyDescriptor pd1, PropertyDescriptor pd2) { if (!compare(pd1.getReadMethod(), pd2.getReadMethod())) { System.out.println("read methods not equal"); return false; } if (!compare(pd1.getWriteMethod(), pd2.getWriteMethod())) { System.out.println("write methods not equal"); return false; } if (pd1.getPropertyType() != pd2.getPropertyType()) { System.out.println("property type not equal"); return false; } if (pd1.getPropertyEditorClass() != pd2.getPropertyEditorClass()) { System.out.println("property editor class not equal"); return false; } if (pd1.isBound() != pd2.isBound()) { System.out.println("bound value not equal"); return false; } if (pd1.isConstrained() != pd2.isConstrained()) { System.out.println("constrained value not equal"); return false; } return true; }
Example 11
Source Project: jdk8u-jdk File: Test4634390.java License: GNU General Public License v2.0 | 5 votes |
private static boolean compare(PropertyDescriptor pd1, PropertyDescriptor pd2) { if (!compare(pd1.getReadMethod(), pd2.getReadMethod())) { System.out.println("read methods not equal"); return false; } if (!compare(pd1.getWriteMethod(), pd2.getWriteMethod())) { System.out.println("write methods not equal"); return false; } if (pd1.getPropertyType() != pd2.getPropertyType()) { System.out.println("property type not equal"); return false; } if (pd1.getPropertyEditorClass() != pd2.getPropertyEditorClass()) { System.out.println("property editor class not equal"); return false; } if (pd1.isBound() != pd2.isBound()) { System.out.println("bound value not equal"); return false; } if (pd1.isConstrained() != pd2.isConstrained()) { System.out.println("constrained value not equal"); return false; } return true; }
Example 12
Source Project: hottub File: Test4634390.java License: GNU General Public License v2.0 | 5 votes |
private static boolean compare(PropertyDescriptor pd1, PropertyDescriptor pd2) { if (!compare(pd1.getReadMethod(), pd2.getReadMethod())) { System.out.println("read methods not equal"); return false; } if (!compare(pd1.getWriteMethod(), pd2.getWriteMethod())) { System.out.println("write methods not equal"); return false; } if (pd1.getPropertyType() != pd2.getPropertyType()) { System.out.println("property type not equal"); return false; } if (pd1.getPropertyEditorClass() != pd2.getPropertyEditorClass()) { System.out.println("property editor class not equal"); return false; } if (pd1.isBound() != pd2.isBound()) { System.out.println("bound value not equal"); return false; } if (pd1.isConstrained() != pd2.isConstrained()) { System.out.println("constrained value not equal"); return false; } return true; }
Example 13
Source Project: openjdk-8-source File: Test4634390.java License: GNU General Public License v2.0 | 5 votes |
private static boolean compare(PropertyDescriptor pd1, PropertyDescriptor pd2) { if (!compare(pd1.getReadMethod(), pd2.getReadMethod())) { System.out.println("read methods not equal"); return false; } if (!compare(pd1.getWriteMethod(), pd2.getWriteMethod())) { System.out.println("write methods not equal"); return false; } if (pd1.getPropertyType() != pd2.getPropertyType()) { System.out.println("property type not equal"); return false; } if (pd1.getPropertyEditorClass() != pd2.getPropertyEditorClass()) { System.out.println("property editor class not equal"); return false; } if (pd1.isBound() != pd2.isBound()) { System.out.println("bound value not equal"); return false; } if (pd1.isConstrained() != pd2.isConstrained()) { System.out.println("constrained value not equal"); return false; } return true; }
Example 14
Source Project: spring4-understanding File: PropertyDescriptorUtils.java License: Apache License 2.0 | 5 votes |
/** * Compare the given {@code PropertyDescriptors} and return {@code true} if * they are equivalent, i.e. their read method, write method, property type, * property editor and flags are equivalent. * @see java.beans.PropertyDescriptor#equals(Object) */ public static boolean equals(PropertyDescriptor pd, PropertyDescriptor otherPd) { return (ObjectUtils.nullSafeEquals(pd.getReadMethod(), otherPd.getReadMethod()) && ObjectUtils.nullSafeEquals(pd.getWriteMethod(), otherPd.getWriteMethod()) && ObjectUtils.nullSafeEquals(pd.getPropertyType(), otherPd.getPropertyType()) && ObjectUtils.nullSafeEquals(pd.getPropertyEditorClass(), otherPd.getPropertyEditorClass()) && pd.isBound() == otherPd.isBound() && pd.isConstrained() == otherPd.isConstrained()); }
Example 15
Source Project: openjdk-8 File: Test4634390.java License: GNU General Public License v2.0 | 5 votes |
private static boolean compare(PropertyDescriptor pd1, PropertyDescriptor pd2) { if (!compare(pd1.getReadMethod(), pd2.getReadMethod())) { System.out.println("read methods not equal"); return false; } if (!compare(pd1.getWriteMethod(), pd2.getWriteMethod())) { System.out.println("write methods not equal"); return false; } if (pd1.getPropertyType() != pd2.getPropertyType()) { System.out.println("property type not equal"); return false; } if (pd1.getPropertyEditorClass() != pd2.getPropertyEditorClass()) { System.out.println("property editor class not equal"); return false; } if (pd1.isBound() != pd2.isBound()) { System.out.println("bound value not equal"); return false; } if (pd1.isConstrained() != pd2.isConstrained()) { System.out.println("constrained value not equal"); return false; } return true; }
Example 16
Source Project: jdk8u_jdk File: Test4634390.java License: GNU General Public License v2.0 | 5 votes |
private static boolean compare(PropertyDescriptor pd1, PropertyDescriptor pd2) { if (!compare(pd1.getReadMethod(), pd2.getReadMethod())) { System.out.println("read methods not equal"); return false; } if (!compare(pd1.getWriteMethod(), pd2.getWriteMethod())) { System.out.println("write methods not equal"); return false; } if (pd1.getPropertyType() != pd2.getPropertyType()) { System.out.println("property type not equal"); return false; } if (pd1.getPropertyEditorClass() != pd2.getPropertyEditorClass()) { System.out.println("property editor class not equal"); return false; } if (pd1.isBound() != pd2.isBound()) { System.out.println("bound value not equal"); return false; } if (pd1.isConstrained() != pd2.isConstrained()) { System.out.println("constrained value not equal"); return false; } return true; }
Example 17
Source Project: jdk8u-jdk File: Test4634390.java License: GNU General Public License v2.0 | 5 votes |
private static boolean compare(PropertyDescriptor pd1, PropertyDescriptor pd2) { if (!compare(pd1.getReadMethod(), pd2.getReadMethod())) { System.out.println("read methods not equal"); return false; } if (!compare(pd1.getWriteMethod(), pd2.getWriteMethod())) { System.out.println("write methods not equal"); return false; } if (pd1.getPropertyType() != pd2.getPropertyType()) { System.out.println("property type not equal"); return false; } if (pd1.getPropertyEditorClass() != pd2.getPropertyEditorClass()) { System.out.println("property editor class not equal"); return false; } if (pd1.isBound() != pd2.isBound()) { System.out.println("bound value not equal"); return false; } if (pd1.isConstrained() != pd2.isConstrained()) { System.out.println("constrained value not equal"); return false; } return true; }
Example 18
Source Project: jdk8u-dev-jdk File: Test4634390.java License: GNU General Public License v2.0 | 5 votes |
private static boolean compare(PropertyDescriptor pd1, PropertyDescriptor pd2) { if (!compare(pd1.getReadMethod(), pd2.getReadMethod())) { System.out.println("read methods not equal"); return false; } if (!compare(pd1.getWriteMethod(), pd2.getWriteMethod())) { System.out.println("write methods not equal"); return false; } if (pd1.getPropertyType() != pd2.getPropertyType()) { System.out.println("property type not equal"); return false; } if (pd1.getPropertyEditorClass() != pd2.getPropertyEditorClass()) { System.out.println("property editor class not equal"); return false; } if (pd1.isBound() != pd2.isBound()) { System.out.println("bound value not equal"); return false; } if (pd1.isConstrained() != pd2.isConstrained()) { System.out.println("constrained value not equal"); return false; } return true; }