ReferenceMethodUnbindMethod, UpdatedMethodpublic class BindMethod extends BaseMethod<BindParameters,List<org.apache.felix.scr.impl.inject.BindMethod.ParamType>> implements ReferenceMethod
BaseMethod.MethodInfo<T>| Constructor | Description |
|---|---|
BindMethod(String methodName,
Class<?> componentClass,
String referenceClassName,
DSVersion dsVersion,
boolean configurableServiceProperties) |
| Modifier and Type | Method | Description |
|---|---|---|
protected BaseMethod.MethodInfo<List<org.apache.felix.scr.impl.inject.BindMethod.ParamType>> |
doFindMethod(Class<?> targetClass,
boolean acceptPrivate,
boolean acceptPackage,
SimpleLogger logger) |
Finds the method named in the
BaseMethod.m_methodName field in the given
targetClass. |
protected String |
getMethodNamePrefix() |
|
protected Object[] |
getParameters(Method method,
BindParameters bp) |
Returns the parameter array created from the
rawParameter
using the actual parameter type list of the method. |
<S,T> boolean |
getServiceObject(ComponentContextImpl<S> key,
RefPair<S,T> refPair,
org.osgi.framework.BundleContext context,
SimpleLogger logger) |
|
MethodResult |
invoke(Object componentInstance,
ComponentContextImpl<?> componentContext,
RefPair<?,?> refPair,
MethodResult methodCallFailureResult,
SimpleLogger logger) |
|
protected void |
setTypes(List<org.apache.felix.scr.impl.inject.BindMethod.ParamType> types) |
accept, getComponentClass, getDSVersion, getMethod, getMethodName, getPackageName, invoke, isDS12Felix, methodExists, returnValueprotected BaseMethod.MethodInfo<List<org.apache.felix.scr.impl.inject.BindMethod.ParamType>> doFindMethod(Class<?> targetClass, boolean acceptPrivate, boolean acceptPackage, SimpleLogger logger) throws SuitableMethodNotAccessibleException, InvocationTargetException
BaseMethod.m_methodName field in the given
targetClass. If the target class has no acceptable method
the class hierarchy is traversed until a method is found or the root
of the class hierarchy is reached without finding a method.doFindMethod in class BaseMethod<BindParameters,List<org.apache.felix.scr.impl.inject.BindMethod.ParamType>>targetClass - The class in which to look for the methodacceptPrivate - true if private methods should be
considered.acceptPackage - true if package private methods should
be considered.logger - null if no acceptable method
can be found in the target class or any super class.InvocationTargetException - If an unexpected Throwable is caught
trying to find the requested method.SuitableMethodNotAccessibleExceptionprotected void setTypes(List<org.apache.felix.scr.impl.inject.BindMethod.ParamType> types)
setTypes in class BaseMethod<BindParameters,List<org.apache.felix.scr.impl.inject.BindMethod.ParamType>>public <S,T> boolean getServiceObject(ComponentContextImpl<S> key, RefPair<S,T> refPair, org.osgi.framework.BundleContext context, SimpleLogger logger)
getServiceObject in interface ReferenceMethodpublic MethodResult invoke(Object componentInstance, ComponentContextImpl<?> componentContext, RefPair<?,?> refPair, MethodResult methodCallFailureResult, SimpleLogger logger)
invoke in interface ReferenceMethodprotected Object[] getParameters(Method method, BindParameters bp)
BaseMethodrawParameter
using the actual parameter type list of the method.getParameters in class BaseMethod<BindParameters,List<org.apache.felix.scr.impl.inject.BindMethod.ParamType>>protected String getMethodNamePrefix()
getMethodNamePrefix in class BaseMethod<BindParameters,List<org.apache.felix.scr.impl.inject.BindMethod.ParamType>>Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.