Class ActivateMethod
java.lang.Object
org.apache.felix.scr.impl.inject.methods.BaseMethod<ActivatorParameter, Object>
org.apache.felix.scr.impl.inject.methods.ActivateMethod
- All Implemented Interfaces:
LifecycleMethod
- Direct Known Subclasses:
DeactivateMethod, ModifiedMethod
public class ActivateMethod
extends BaseMethod<ActivatorParameter, Object>
implements LifecycleMethod
-
Nested Class Summary
Nested classes/interfaces inherited from class BaseMethod
BaseMethod.MethodInfo<T> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionActivateMethod(String methodName, boolean methodRequired, Class<?> componentClass, DSVersion dsVersion, boolean configurableServiceProperties, boolean supportsInterfaces) -
Method Summary
Modifier and TypeMethodDescriptionprotected BaseMethod.MethodInfo<Object> doFindMethod(Class<?> targetClass, boolean acceptPrivate, boolean acceptPackage, ComponentLogger logger) protected Stringprotected Object[]getParameters(Method method, ActivatorParameter rawParameter) Returns the parameter array created from therawParameterusing the actual parameter type list of themethod.getSortedMethods(Class<?> targetClass) returns the declared methods of the target class, with the correct name, sorted by number of parameters ( no parameters last)invoke(Object componentInstance, ActivatorParameter rawParameter, MethodResult methodCallFailureResult) Calls the declared method on the given component with the provided method call arguments.invoke(Object componentInstance, ScrComponentContext componentContext, int reason, MethodResult methodCallFailureResult) private booleanisAnnotation(Class<?> t1) (package private) booleanprotected voidMethods inherited from class BaseMethod
accept, getComponentClass, getDSVersion, getMethod, getMethod, getMethodName, getPackageName, getState, isDS12Felix, methodExists, returnValue, setMethod
-
Field Details
-
m_supportsInterfaces
protected final boolean m_supportsInterfaces
-
-
Constructor Details
-
ActivateMethod
-
-
Method Details
-
doFindMethod
protected BaseMethod.MethodInfo<Object> doFindMethod(Class<?> targetClass, boolean acceptPrivate, boolean acceptPackage, ComponentLogger logger) throws SuitableMethodNotAccessibleException, InvocationTargetException - Specified by:
doFindMethodin classBaseMethod<ActivatorParameter, Object>- Throws:
SuitableMethodNotAccessibleExceptionInvocationTargetException
-
setTypes
- Specified by:
setTypesin classBaseMethod<ActivatorParameter, Object>
-
isDeactivate
boolean isDeactivate() -
getSortedMethods
-
isAnnotation
-
getParameters
Description copied from class:BaseMethodReturns the parameter array created from therawParameterusing the actual parameter type list of themethod.- Specified by:
getParametersin classBaseMethod<ActivatorParameter, Object>- Parameters:
method-rawParameter-- Returns:
-
getMethodNamePrefix
- Overrides:
getMethodNamePrefixin classBaseMethod<ActivatorParameter, Object>
-
invoke
public MethodResult invoke(Object componentInstance, ScrComponentContext componentContext, int reason, MethodResult methodCallFailureResult) - Specified by:
invokein interfaceLifecycleMethod- See Also:
-
invoke
public MethodResult invoke(Object componentInstance, ActivatorParameter rawParameter, MethodResult methodCallFailureResult) Description copied from class:BaseMethodCalls the declared method on the given component with the provided method call arguments.- Overrides:
invokein classBaseMethod<ActivatorParameter, Object>- Parameters:
componentInstance- The component instance on which to call the methodrawParameter- The parameter container providing the actual parameters to provide to the called methodmethodCallFailureResult- The result to return from this method if calling the method resulted in an exception.- Returns:
trueif the method was called successfully or the method was not found and was not required.falseif the method was not found but required.methodCallFailureResultis returned if the method was found and called, but the method threw an exception.
-