Package org.zkoss.stateless.sul
Class IComponentCtrl
- java.lang.Object
-
- org.zkoss.stateless.sul.IComponentCtrl
-
public class IComponentCtrl extends java.lang.Object
An addition interface toIComponent
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)
static boolean
isBuiltinType(java.lang.Class<?> type)
Tests if the giventype
is a built-in typestatic boolean
isDateType(java.lang.Class<?> type)
Tests if the giventype
is Java Date type.static boolean
isFileType(java.lang.Class<?> type)
Tests if the giventype
isFileData
.static boolean
isPojo(java.lang.Class<?> type)
Tests if the giventype
is Java POJO-like object.static boolean
isPrimitive(java.lang.Class<?> type)
Tests if the giventype
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)
Rendersactions
to client widget with its bound parameters.
-
-
-
Method Detail
-
renderActions
public static void renderActions(java.util.List<ActionHandler> actionHandlerList, StatelessContentRenderer renderer) throws java.io.IOException
Rendersactions
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 giventype
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 giventype
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 giventype
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 giventype
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 giventype
isFileData
.- Parameters:
type
- A class to test with- Returns:
true
if it's aFileData
.
-
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)
- Parameters:
iComponent
- The immutable component to test with.- Returns:
true
, if it contains.
-
-