Class AbstractAnnotatedMethodInvoker<T extends java.lang.annotation.Annotation>


  • public abstract class AbstractAnnotatedMethodInvoker<T extends java.lang.annotation.Annotation>
    extends java.lang.Object
    To help calling a ViewModel annotated method with binding arguments.
    Author:
    Ian Y.T Tsai(zanyking)
    See Also:
    Init, AfterCompose
    • Constructor Detail

      • AbstractAnnotatedMethodInvoker

        public AbstractAnnotatedMethodInvoker​(java.lang.Class<T> annoClass,
                                              java.util.Map<java.lang.Class<?>,​java.util.List<java.lang.reflect.Method>> annoMethodCache)
    • Method Detail

      • hasAnnotatedMethod

        public boolean hasAnnotatedMethod​(Binder binder)
      • invokeMethod

        public void invokeMethod​(Binder binder,
                                 java.util.Map<java.lang.String,​java.lang.Object> bindingArgs)
      • invokeMethod

        public void invokeMethod​(Binder binder,
                                 java.util.Map<java.lang.String,​java.lang.Object> bindingArgs,
                                 Event triggeringEvent,
                                 boolean notifyChange)
      • handleNotifyChange

        protected void handleNotifyChange​(Binder binder,
                                          BindContext ctx,
                                          java.lang.Object viewModel,
                                          java.lang.reflect.Method m,
                                          ParamCall parCall,
                                          java.util.Set<Property> changes)
      • fireNotifyChanges

        protected void fireNotifyChanges​(Binder binder,
                                         java.util.Set<Property> changes)
      • shouldLookupSuperclass

        protected abstract boolean shouldLookupSuperclass​(T annotation)
        Verify if the super classes need to be traced.
        Parameters:
        annotation -
        Returns:
        true, if handler should trace super class, false otherwise.