Class ActivateMethod

    • Field Detail

      • m_supportsInterfaces

        protected final boolean m_supportsInterfaces
    • Constructor Detail

      • ActivateMethod

        public ActivateMethod​(java.lang.String methodName,
                              boolean methodRequired,
                              java.lang.Class<?> componentClass,
                              DSVersion dsVersion,
                              boolean configurableServiceProperties,
                              boolean supportsInterfaces)
    • Method Detail

      • isDeactivate

        boolean isDeactivate()
      • getSortedMethods

        java.util.List<java.lang.reflect.Method> getSortedMethods​(java.lang.Class<?> targetClass)
        returns the declared methods of the target class, with the correct name, sorted by number of parameters ( no parameters last)
        Parameters:
        targetClass - class to examine methods of
        Returns:
        sorted methods of correct name;
      • isAnnotation

        private boolean isAnnotation​(java.lang.Class<?> t1)
      • getParameters

        protected java.lang.Object[] getParameters​(java.lang.reflect.Method method,
                                                   ActivatorParameter rawParameter)
        Description copied from class: BaseMethod
        Returns the parameter array created from the rawParameter using the actual parameter type list of the method.
        Specified by:
        getParameters in class BaseMethod<ActivatorParameter,​java.lang.Object>
        Returns:
      • invoke

        public MethodResult invoke​(java.lang.Object componentInstance,
                                   ActivatorParameter rawParameter,
                                   MethodResult methodCallFailureResult)
        Description copied from class: BaseMethod
        Calls the declared method on the given component with the provided method call arguments.
        Overrides:
        invoke in class BaseMethod<ActivatorParameter,​java.lang.Object>
        Parameters:
        componentInstance - The component instance on which to call the method
        rawParameter - The parameter container providing the actual parameters to provide to the called method
        methodCallFailureResult - The result to return from this method if calling the method resulted in an exception.
        Returns:
        true if the method was called successfully or the method was not found and was not required. false if the method was not found but required. methodCallFailureResult is returned if the method was found and called, but the method threw an exception.