Package org.apache.felix.scr.impl.inject
Class ActivateMethod
- java.lang.Object
-
- org.apache.felix.scr.impl.inject.BaseMethod<ActivatorParameter,Object>
-
- org.apache.felix.scr.impl.inject.ActivateMethod
-
- All Implemented Interfaces:
ComponentMethod
- Direct Known Subclasses:
DeactivateMethod,ModifiedMethod
public class ActivateMethod extends BaseMethod<ActivatorParameter,Object> implements ComponentMethod
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.felix.scr.impl.inject.BaseMethod
BaseMethod.MethodInfo<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected static Class<?>BUNDLE_CONTEXT_CLASSprotected static Class<?>COMPONENT_CONTEXT_CLASSprotected static Class<?>INTEGER_CLASSprotected booleanm_supportsInterfaces
-
Constructor Summary
Constructors Constructor Description ActivateMethod(String methodName, boolean methodRequired, Class<?> componentClass, DSVersion dsVersion, boolean configurableServiceProperties, boolean supportsInterfaces)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BaseMethod.MethodInfo<Object>doFindMethod(Class<?> targetClass, boolean acceptPrivate, boolean acceptPackage, SimpleLogger logger)protected StringgetMethodNamePrefix()protected Object[]getParameters(Method method, ActivatorParameter rawParameter)Returns the parameter array created from therawParameterusing the actual parameter type list of themethod.MethodResultinvoke(Object componentInstance, ActivatorParameter rawParameter, MethodResult methodCallFailureResult, SimpleLogger logger)Calls the declared method on the given component with the provided method call arguments.MethodResultinvoke(Object componentInstance, org.osgi.service.component.ComponentContext componentContext, int reason, MethodResult methodCallFailureResult, SimpleLogger logger)protected voidsetTypes(Object types)-
Methods inherited from class org.apache.felix.scr.impl.inject.BaseMethod
accept, getComponentClass, getDSVersion, getMethod, getMethodName, getPackageName, isDS12Felix, methodExists, returnValue
-
-
-
-
Method Detail
-
doFindMethod
protected BaseMethod.MethodInfo<Object> doFindMethod(Class<?> targetClass, boolean acceptPrivate, boolean acceptPackage, SimpleLogger logger) throws SuitableMethodNotAccessibleException, InvocationTargetException
- Specified by:
doFindMethodin classBaseMethod<ActivatorParameter,Object>- Throws:
SuitableMethodNotAccessibleExceptionInvocationTargetException
-
setTypes
protected void setTypes(Object types)
- Specified by:
setTypesin classBaseMethod<ActivatorParameter,Object>
-
getParameters
protected Object[] getParameters(Method method, ActivatorParameter rawParameter)
Description copied from class:BaseMethodReturns the parameter array created from therawParameterusing the actual parameter type list of themethod.- Specified by:
getParametersin classBaseMethod<ActivatorParameter,Object>- Returns:
-
getMethodNamePrefix
protected String getMethodNamePrefix()
- Overrides:
getMethodNamePrefixin classBaseMethod<ActivatorParameter,Object>
-
invoke
public MethodResult invoke(Object componentInstance, org.osgi.service.component.ComponentContext componentContext, int reason, MethodResult methodCallFailureResult, SimpleLogger logger)
- Specified by:
invokein interfaceComponentMethod
-
invoke
public MethodResult invoke(Object componentInstance, ActivatorParameter rawParameter, MethodResult methodCallFailureResult, SimpleLogger logger)
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.
-
-