public static Collection<Method> resolveMethods(final NamedMethodMetaData methodData, final Class<?> componentClass, final DeploymentReflectionIndex reflectionIndex) throws DeploymentUnitProcessingException { return resolveMethods(methodData.getMethodName(), methodData.getMethodParams(), componentClass, reflectionIndex); }
public static Method resolveMethod(final NamedMethodMetaData methodData, final Class<?> componentClass, final DeploymentReflectionIndex reflectionIndex) throws DeploymentUnitProcessingException { return resolveMethod(methodData.getMethodName(), methodData.getMethodParams(), componentClass, reflectionIndex); }
private Method resolveMethod(final DeploymentReflectionIndex index, final Class<?> currentClass, final Class<?> componentClass, final NamedMethodMetaData methodData) throws DeploymentUnitProcessingException { if (currentClass == null) { throw EjbLogger.ROOT_LOGGER.failToFindMethodWithParameterTypes(componentClass.getName(), methodData.getMethodName(), methodData.getMethodParams()); } final ClassReflectionIndex classIndex = index.getClassIndex(currentClass); if (methodData.getMethodParams() == null) { final Collection<Method> methods = classIndex.getAllMethods(methodData.getMethodName()); if (methods.isEmpty()) { return resolveMethod(index, currentClass.getSuperclass(), componentClass, methodData); } else if (methods.size() > 1) { throw EjbLogger.ROOT_LOGGER.multipleMethodReferencedInEjbJarXml(methodData.getMethodName(), currentClass.getName()); } return methods.iterator().next(); } else { final Collection<Method> methods = classIndex.getAllMethods(methodData.getMethodName(), methodData.getMethodParams().size()); for (final Method method : methods) { boolean match = true; for (int i = 0; i < method.getParameterTypes().length; ++i) { if (!method.getParameterTypes()[i].getName().equals(methodData.getMethodParams().get(i))) { match = false; break; } } if (match) { return method; } } } return resolveMethod(index, currentClass.getSuperclass(), componentClass, methodData); }
final ClassReflectionIndex classIndex = index.getClassIndex(componentClass); Method resolvedMethod = null; if (methodData.getMethodParams() == null) { final Collection<Method> methods = classIndex.getAllMethods(methodData.getMethodName()); if (methods.isEmpty()) { final Collection<Method> methods = classIndex.getAllMethods(methodData.getMethodName(), methodData.getMethodParams().size()); for (final Method method : methods) { boolean match = true; for (int i = 0; i < method.getParameterTypes().length; ++i) { if (!method.getParameterTypes()[i].getName().equals(methodData.getMethodParams().get(i))) { match = false; break; throw EjbLogger.ROOT_LOGGER.failToFindMethodWithParameterTypes(componentClass.getName(), methodData.getMethodName(), methodData.getMethodParams());
final ClassReflectionIndex classIndex = index.getClassIndex(componentClass); Method resolvedMethod = null; if (methodData.getMethodParams() == null) { final Collection<Method> methods = classIndex.getAllMethods(methodData.getMethodName()); if (methods.isEmpty()) { final Collection<Method> methods = classIndex.getAllMethods(methodData.getMethodName(), methodData.getMethodParams().size()); for (final Method method : methods) { boolean match = true; for (int i = 0; i < method.getParameterTypes().length; ++i) { if (!method.getParameterTypes()[i].getName().equals(methodData.getMethodParams().get(i))) { match = false; break; throw EjbLogger.ROOT_LOGGER.failToFindMethodWithParameterTypes(componentClass.getName(), methodData.getMethodName(), methodData.getMethodParams());
if(removeMethod.getBeanMethod().getMethodParams() == null) { final NamedMethodMetaData methodData = removeMethod.getBeanMethod(); final Collection<Method> methods = MethodResolutionUtils.resolveMethods(methodData, componentClass, reflectionIndex); if(removeMethod.getBeanMethod().getMethodParams() != null) { final NamedMethodMetaData methodData = removeMethod.getBeanMethod(); final Collection<Method> methods = MethodResolutionUtils.resolveMethods(methodData, componentClass, reflectionIndex);
public static Method resolveMethod(final NamedMethodMetaData methodData, final Class<?> componentClass, final DeploymentReflectionIndex reflectionIndex) throws DeploymentUnitProcessingException { return resolveMethod(methodData.getMethodName(), methodData.getMethodParams(), componentClass, reflectionIndex); }
public static Collection<Method> resolveMethods(final NamedMethodMetaData methodData, final Class<?> componentClass, final DeploymentReflectionIndex reflectionIndex) throws DeploymentUnitProcessingException { return resolveMethods(methodData.getMethodName(), methodData.getMethodParams(), componentClass, reflectionIndex); }
private Method resolveMethod(final DeploymentReflectionIndex index, final Class<?> currentClass, final Class<?> componentClass, final NamedMethodMetaData methodData) throws DeploymentUnitProcessingException { if (currentClass == null) { throw MESSAGES.failToFindMethodWithParameterTypes(componentClass.getName(), methodData.getMethodName(), methodData.getMethodParams()); } final ClassReflectionIndex<?> classIndex = index.getClassIndex(currentClass); if (methodData.getMethodParams() == null) { final Collection<Method> methods = classIndex.getAllMethods(methodData.getMethodName()); if (methods.isEmpty()) { return resolveMethod(index, currentClass.getSuperclass(), componentClass, methodData); } else if (methods.size() > 1) { throw MESSAGES.multipleMethodReferencedInEjbJarXml( methodData.getMethodName(),currentClass.getName()); } return methods.iterator().next(); } else { final Collection<Method> methods = classIndex.getAllMethods(methodData.getMethodName(), methodData.getMethodParams().size()); for (final Method method : methods) { boolean match = true; for (int i = 0; i < method.getParameterTypes().length; ++i) { if (!method.getParameterTypes()[i].getName().equals(methodData.getMethodParams().get(i))) { match = false; break; } } if (match) { return method; } } } return resolveMethod(index, currentClass.getSuperclass(), componentClass, methodData); }
MethodParametersMetaData timeoutMethodParams = timeoutMethodMetaData.getMethodParams(); Class<?>[] timeoutMethodParamTypes = null; if (timeoutMethodParams != null)
MethodParametersMetaData methodParams = timeoutMethodMetaData.getMethodParams(); String[] paramTypes = methodParams == null ? null : methodParams.toArray(new String[methodParams.size()]); timeoutMethodParams = this.loadTimeoutMethodParamTypes(beanClass.getClassLoader(), paramTypes);
private void addAnnotations(Class<? extends Annotation> annotationClass, Annotation annotation, EJBContainer container, MethodMetaData method) throws ClassNotFoundException, NoSuchMethodException, NoSuchFieldException { addAnnotations(annotationClass, annotation, container, method.getMethodName(), method.getMethodParams()); }
try List<String> methodParameters = removeMethodMetaData.getBeanMethod().getMethodParams(); List<Class<?>> parameterTypes = new ArrayList<Class<?>>(); for (String methodParameter : methodParameters)
try List<String> methodParameters = removeMethodMetaData.getBeanMethod().getMethodParams(); List<Class<?>> parameterTypes = new ArrayList<Class<?>>(); for (String methodParameter : methodParameters)
Method beanMethod = MethodResolutionUtils.resolveMethod(method.getBeanMethod(), componentClass, deploymentReflectionIndex); if (method.getCreateMethod() != null) { MethodParametersMetaData p = method.getCreateMethod().getMethodParams(); description.addInitMethod(beanMethod, method.getCreateMethod().getMethodName()); } else {
final ClassReflectionIndex<?> classIndex = index.getClassIndex(componentClass); Method resolvedMethod = null; if (methodData.getMethodParams() == null) { final Collection<Method> methods = classIndex.getAllMethods(methodData.getMethodName()); if (methods.isEmpty()) { final Collection<Method> methods = classIndex.getAllMethods(methodData.getMethodName(), methodData.getMethodParams().size()); for (final Method method : methods) { boolean match = true; for (int i = 0; i < method.getParameterTypes().length; ++i) { if (!method.getParameterTypes()[i].getName().equals(methodData.getMethodParams().get(i))) { match = false; break; throw MESSAGES.failToFindMethodWithParameterTypes(componentClass.getName(), methodData.getMethodName(), methodData.getMethodParams());
final ClassReflectionIndex<?> classIndex = index.getClassIndex(componentClass); Method resolvedMethod = null; if (methodData.getMethodParams() == null) { final Collection<Method> methods = classIndex.getAllMethods(methodData.getMethodName()); if (methods.isEmpty()) { final Collection<Method> methods = classIndex.getAllMethods(methodData.getMethodName(), methodData.getMethodParams().size()); for (final Method method : methods) { boolean match = true; for (int i = 0; i < method.getParameterTypes().length; ++i) { if (!method.getParameterTypes()[i].getName().equals(methodData.getMethodParams().get(i))) { match = false; break; throw MESSAGES.failToFindMethodWithParameterTypes(componentClass.getName(), methodData.getMethodName(), methodData.getMethodParams());
if (timeoutMethodMetaData.getMethodParams() != null) methodStringBuilder.append(Arrays.toString(timeoutMethodMetaData.getMethodParams().toArray()));
if(removeMethod.getBeanMethod().getMethodParams() == null) { final NamedMethodMetaData methodData = removeMethod.getBeanMethod(); final Collection<Method> methods = MethodResolutionUtils.resolveMethods(methodData, componentClass, reflectionIndex); if(removeMethod.getBeanMethod().getMethodParams() != null) { final NamedMethodMetaData methodData = removeMethod.getBeanMethod(); final Collection<Method> methods = MethodResolutionUtils.resolveMethods(methodData, componentClass, reflectionIndex);