Class BeanAccess


  • public class BeanAccess
    extends Object
    • Method Detail

      • isDescriptorHidden

        public static boolean isDescriptorHidden​(IAttributedFeatureInfo descriptor)
        Returns true if the method or property is hidden or otherwise not scriptable.
      • isBeanType

        public static boolean isBeanType​(IType typeSource)
      • isNumericType

        public static boolean isNumericType​(IType intrType)
      • isBoxedTypeFor

        public static boolean isBoxedTypeFor​(IType primitiveType,
                                             IType boxedType)
      • areValuesEqual

        public static boolean areValuesEqual​(Object lhsValue,
                                             Object rhsValue)
        Returns true if the values are logically equal, false otherwise.

        Perform an equality comparison. Heuristics for evaluation follow:

        • If the LHS is a Number, coerce the RHS to a Number value and compare.
        • If the LHS is a String, coerce the RHS to a String value and String compare.
        • (Ditto for Boolean and DateTime).
        • If the LHS is a Bean,
          • If the RHS is a Bean, compare with equals().
          • Otherwise, attempt to determine which operand is coercible to the other, coerce, and compare with equals().
        • Otherwise, compare with equals().
      • areBeansEqual

        public static boolean areBeansEqual​(Object bean1,
                                            Object bean2)
        Test for equality between two BeanType values. Note this method is not entirely appropriate for non-BeanType value i.e., it's not as intelligent as EqualityExpression comparing primitive types, TypeKeys, etc.

        Msotly this method is for handling conversion of KeyableBean and Key for comparison.

        Parameters:
        bean1 - A value having an IType of BeanType
        bean2 - A value having an IType of BeanType
        Returns:
        True if the beans are equal
      • getPropertyInfoDirectly

        public static IPropertyInfo getPropertyInfoDirectly​(IType classBean,
                                                            String strProperty)
                                                     throws ParseException
        Resolves the property directly, as if the type were requesting it, giving access to all properties
        Throws:
        ParseException
      • getPropertyInfoDirectly_NoException

        public static IPropertyInfo getPropertyInfoDirectly_NoException​(IType classBean,
                                                                        String strProperty)
        Resolves the property directly, as if the type were requesting it, giving access to all properties