Class BeanAccess

java.lang.Object
gw.internal.gosu.parser.BeanAccess

public class BeanAccess extends Object
  • Constructor Details

    • BeanAccess

      private BeanAccess()
      private to enforce singleton access.
  • Method Details

    • 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)
    • isDimension

      private static boolean isDimension(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().
    • areObjectsLogicallyEqual

      private static boolean areObjectsLogicallyEqual(IType lhsType, IType rhsType, Object lhsValue, Object rhsValue)
    • 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
    • getProperties

      public static List<? extends IPropertyInfo> getProperties(ITypeInfo beanInfo, IType classBean)
    • getMethods

      public static MethodList getMethods(ITypeInfo beanInfo, IType whosaskin)
    • 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
    • getPropertyInfo

      public static IPropertyInfo getPropertyInfo(IType classBean, String strProperty, IFeatureFilter filter, ParserBase parser, IScriptabilityModifier scriptabilityConstraint) throws ParseException
      Throws:
      ParseException
    • getPropertyInfo

      public static IPropertyInfo getPropertyInfo(IType classBean, IType whosAskin, String strProperty, IFeatureFilter filter, ParserBase parser, IScriptabilityModifier scriptabilityConstraint) throws ParseException
      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
    • getPropertyInfo_NoException

      public static IPropertyInfo getPropertyInfo_NoException(IType classBean, String strProperty, IFeatureFilter filter, ParserBase parser, IScriptabilityModifier scriptabilityConstraint)
    • getPropertyInfo_NoException

      private static IPropertyInfo getPropertyInfo_NoException(IType classBean, IType whosAskin, String strProperty, IFeatureFilter filter, ParserBase parser, IScriptabilityModifier scriptabilityConstraint)
    • getProperty

      public static IPropertyInfo getProperty(ITypeInfo beanInfo, IType classBean, String strMember)