Class AnnotatedAction

  • All Implemented Interfaces:
    Executable

    public class AnnotatedAction
    extends java.lang.Object
    implements Executable
    AnnotatedMethodAction that invokes a method of the bean instance specified by the annotation.

    Created: 2016. 2. 9.

    Since:
    2.0.0
    • Constructor Detail

      • AnnotatedAction

        public AnnotatedAction​(AnnotatedActionRule annotatedActionRule)
        Instantiates a new AnnotatedMethodAction.
        Parameters:
        annotatedActionRule - the annotated method action rule
    • Method Detail

      • execute

        public java.lang.Object execute​(Activity activity)
                                 throws java.lang.Exception
        Description copied from interface: Executable
        Execute this action.
        Specified by:
        execute in interface Executable
        Parameters:
        activity - the activity
        Returns:
        the result of action execution
        Throws:
        java.lang.Exception - if the action fails to execute
      • getAnnotatedActionRule

        public AnnotatedActionRule getAnnotatedActionRule()
        Returns the annotated bean method action rule.
        Returns:
        the annotated bean method action rule
      • getActionId

        public java.lang.String getActionId()
        Description copied from interface: Executable
        Gets the action id.
        Specified by:
        getActionId in interface Executable
        Returns:
        the action id
      • isHidden

        public boolean isHidden()
        Description copied from interface: Executable
        Returns whether this action is hidden.
        Specified by:
        isHidden in interface Executable
        Returns:
        true, if is hidden action
      • getActionRule

        public <T> T getActionRule()
        Description copied from interface: Executable
        Gets the action rule.
        Specified by:
        getActionRule in interface Executable
        Type Parameters:
        T - the generic type
        Returns:
        the action rule
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • invokeMethod

        public static java.lang.Object invokeMethod​(Activity activity,
                                                    java.lang.Object bean,
                                                    java.lang.reflect.Method method,
                                                    ParameterBindingRule[] parameterBindingRules)
                                             throws java.lang.Exception
        Throws:
        java.lang.Exception