Class BaseModelResolver

    • Constructor Detail

      • BaseModelResolver

        public BaseModelResolver()
    • Method Detail

      • is

        public java.lang.Boolean is​(java.lang.Object value,
                                    java.lang.Class<?> type)
        Description copied from interface: ModelResolver
        Check whether or not a specified value instance is of the specified type.
        Specified by:
        is in interface ModelResolver
        Returns:
        true when the value is of the specified type, otherwise false.
      • as

        public java.lang.Object as​(java.lang.Object value,
                                   java.lang.Class<?> type,
                                   boolean isStrict)
        Description copied from interface: ModelResolver
        Cast the specified value to the specified type. When type conversion is not possible, null should be returned unless the isStrict flag is set to true wherein an Exception will be thrown.
        Specified by:
        as in interface ModelResolver
        Parameters:
        value - model object instance
        type - type to which the value should be case
        isStrict - flag indicating how to handle invalid type conversion
        Returns:
        the result of the value conversion or null if conversion is not possible.