Class AbstractRuntimeObjectModel

    • Constructor Detail

      • AbstractRuntimeObjectModel

        public AbstractRuntimeObjectModel()
    • Method Detail

      • isPrimitive

        public boolean isPrimitive​(Object obj)
        Description copied from interface: RuntimeObjectModel
        Checks if the provided object represents a primitive data type or not.
        Specified by:
        isPrimitive in interface RuntimeObjectModel
        Parameters:
        obj - the target object
        Returns:
        true if the target is a primitive, false otherwise
      • isDate

        public boolean isDate​(Object target)
        Description copied from interface: RuntimeObjectModel
        Checks if the provided object represents a date or calendar.
        Specified by:
        isDate in interface RuntimeObjectModel
        Parameters:
        target - the target object
        Returns:
        true if the target is a date or calendar, false otherwise
      • isNumber

        public boolean isNumber​(Object target)
        Description copied from interface: RuntimeObjectModel
        Checks if the provided object represents a number or not.
        Specified by:
        isNumber in interface RuntimeObjectModel
        Parameters:
        target - the target object
        Returns:
        true if the target is a number, false otherwise
      • isCollection

        public boolean isCollection​(Object target)
        Description copied from interface: RuntimeObjectModel
        Checks if an object is a Collection or is backed by one.
        Specified by:
        isCollection in interface RuntimeObjectModel
        Parameters:
        target - the target object
        Returns:
        true if the target is a collection or is backed by one, false otherwise
      • resolveProperty

        public Object resolveProperty​(Object target,
                                      Object property)
        Description copied from interface: RuntimeObjectModel
        Resolve a property of a target object and return its value. The property can be either an index or a name
        Specified by:
        resolveProperty in interface RuntimeObjectModel
        Parameters:
        target - the target object
        property - the property to be resolved
        Returns:
        the value of the property
      • toBoolean

        public boolean toBoolean​(Object object)
        Description copied from interface: RuntimeObjectModel
        Convert the given object to a boolean value
        Specified by:
        toBoolean in interface RuntimeObjectModel
        Parameters:
        object - the target object
        Returns:
        the boolean representation of that object
      • toDate

        public Date toDate​(Object object)
        Description copied from interface: RuntimeObjectModel
        Convert the given object to a Date object
        Specified by:
        toDate in interface RuntimeObjectModel
        Parameters:
        object - the target object
        Returns:
        the date represented by the object
      • toString

        public String toString​(Object target)
        Description copied from interface: RuntimeObjectModel
        Convert the given object to a string.
        Specified by:
        toString in interface RuntimeObjectModel
        Parameters:
        target - the target object
        Returns:
        the string representation of the object
      • toMap

        public Map toMap​(Object object)
        Description copied from interface: RuntimeObjectModel
        Force the conversion of the target object to a map
        Specified by:
        toMap in interface RuntimeObjectModel
        Parameters:
        object - the target object
        Returns:
        a map representation of the object. Default is an empty map