Class IComponentCtrl


  • public class IComponentCtrl
    extends java.lang.Object
    An addition interface to IComponent that is used for implementation or tools.
    Author:
    jumperchen
    • Constructor Summary

      Constructors 
      Constructor Description
      IComponentCtrl()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean hasAction​(IComponent iComponent)
      Tests if the given IComponent contains aciton or actions.
      static boolean isBuiltinType​(java.lang.Class<?> type)
      Tests if the given type is a built-in type
      static boolean isDateType​(java.lang.Class<?> type)
      Tests if the given type is Java Date type.
      static boolean isFileType​(java.lang.Class<?> type)
      Tests if the given type is FileData.
      static boolean isPojo​(java.lang.Class<?> type)
      Tests if the given type is Java POJO-like object.
      static boolean isPrimitive​(java.lang.Class<?> type)
      Tests if the given type is primitive type or primitive object type.
      static Action lookupActionAnnotation​(ActionHandler actionHandler, java.lang.reflect.Method method)
      Looks up the @Action annotation on the given method if any.
      static void renderActions​(java.util.List<ActionHandler> actionHandlerList, StatelessContentRenderer renderer)
      Renders actions to client widget with its bound parameters.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IComponentCtrl

        public IComponentCtrl()
    • Method Detail

      • renderActions

        public static void renderActions​(java.util.List<ActionHandler> actionHandlerList,
                                         StatelessContentRenderer renderer)
                                  throws java.io.IOException
        Renders actions to client widget with its bound parameters.
        Parameters:
        actionHandlerList -
        renderer -
        Throws:
        java.io.IOException
      • isPrimitive

        public static boolean isPrimitive​(java.lang.Class<?> type)
        Tests if the given type is primitive type or primitive object type.
        Parameters:
        type - A class to test with
        Returns:
        true if it's the primitive type or primitive object type.
      • isPojo

        public static boolean isPojo​(java.lang.Class<?> type)
        Tests if the given type is Java POJO-like object.
        Parameters:
        type - A class to test with
        Returns:
        true if it's the POJO object type.
      • isDateType

        public static boolean isDateType​(java.lang.Class<?> type)
        Tests if the given type is Java Date type.

        Note: only support the types in jackson.datatype.jsr310

        Parameters:
        type - A class to test with
        Returns:
        true if it's the Java Date type.
      • isBuiltinType

        public static boolean isBuiltinType​(java.lang.Class<?> type)
        Tests if the given type is a built-in type
        Parameters:
        type - a class to test with
        Returns:
        true if it's a built-in type.
      • isFileType

        public static boolean isFileType​(java.lang.Class<?> type)
        Tests if the given type is FileData.
        Parameters:
        type - A class to test with
        Returns:
        true if it's a FileData.
      • lookupActionAnnotation

        public static Action lookupActionAnnotation​(ActionHandler actionHandler,
                                                    java.lang.reflect.Method method)
        Looks up the @Action annotation on the given method if any.
        Parameters:
        actionHandler - The lookup action handler.
        method - The lookup action method
        Returns:
        Action if found or null is assumed.
      • hasAction

        public static boolean hasAction​(IComponent iComponent)
        Tests if the given IComponent contains aciton or actions.
        Parameters:
        iComponent - The immutable component to test with.
        Returns:
        true, if it contains.