public class BindMethod extends BaseMethod<BindParameters,List<ValueUtils.ValueType>> implements ReferenceMethod
BaseMethod.MethodInfo<T>
NOPReferenceMethod
Constructor and Description |
---|
BindMethod(String methodName,
Class<?> componentClass,
String referenceClassName,
DSVersion dsVersion,
boolean configurableServiceProperties) |
Modifier and Type | Method and Description |
---|---|
protected BaseMethod.MethodInfo<List<ValueUtils.ValueType>> |
doFindMethod(Class<?> targetClass,
boolean acceptPrivate,
boolean acceptPackage,
ComponentLogger 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(BindParameters parameters,
org.osgi.framework.BundleContext context) |
protected void |
setTypes(List<ValueUtils.ValueType> types) |
accept, getComponentClass, getDSVersion, getMethod, getMethodName, getPackageName, invoke, isDS12Felix, methodExists, returnValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
invoke
protected BaseMethod.MethodInfo<List<ValueUtils.ValueType>> doFindMethod(Class<?> targetClass, boolean acceptPrivate, boolean acceptPackage, ComponentLogger 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<ValueUtils.ValueType>>
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.SuitableMethodNotAccessibleException
protected void setTypes(List<ValueUtils.ValueType> types)
setTypes
in class BaseMethod<BindParameters,List<ValueUtils.ValueType>>
public <S,T> boolean getServiceObject(BindParameters parameters, org.osgi.framework.BundleContext context)
getServiceObject
in interface ReferenceMethod
protected Object[] getParameters(Method method, BindParameters bp)
BaseMethod
rawParameter
using the actual parameter type list of the method
.getParameters
in class BaseMethod<BindParameters,List<ValueUtils.ValueType>>
protected String getMethodNamePrefix()
getMethodNamePrefix
in class BaseMethod<BindParameters,List<ValueUtils.ValueType>>
Copyright © 2006–2020 The Apache Software Foundation. All rights reserved.