public static Method resolveMethod(final MethodMetaData methodData, final Class<?> componentClass, final DeploymentReflectionIndex reflectionIndex) throws DeploymentUnitProcessingException { return resolveMethod(methodData.getMethodName(), methodData.getMethodParams(), componentClass, reflectionIndex); }
private void handleExcludeMethods(final EJBComponentDescription componentDescription, final ExcludeListMetaData excludeList) { for (final MethodMetaData method : excludeList.getMethods()) { final String methodName = method.getMethodName(); final MethodIntf defaultMethodIntf = (componentDescription instanceof MessageDrivenComponentDescription) ? MethodIntf.MESSAGE_ENDPOINT : MethodIntf.BEAN; final MethodIntf methodIntf = this.getMethodIntf(method.getMethodIntf(), defaultMethodIntf); if (methodName.equals("*")) { componentDescription.getDescriptorMethodPermissions().setAttribute(methodIntf, null, EJBMethodSecurityAttribute.denyAll()); } else { final MethodParametersMetaData methodParams = method.getMethodParams(); // update the session bean description with the tx attribute info if (methodParams == null) { componentDescription.getDescriptorMethodPermissions().setAttribute(methodIntf, EJBMethodSecurityAttribute.denyAll(), methodName); } else { componentDescription.getDescriptorMethodPermissions().setAttribute(methodIntf, EJBMethodSecurityAttribute.denyAll(), null, methodName, this.getMethodParams(methodParams)); } } } }
} else { final MethodParametersMetaData methodParams = method.getMethodParams();
final MethodParametersMetaData methodParams = method.getMethodParams();
/** * Whether the parameters were given * * @return true when the parameters were given */ public boolean isParamGiven() { return methodDelegate.getMethodParams() != null; }
/** * Whether the parameters were given * * @return true when the parameters were given */ public boolean isParamGiven() { return methodDelegate.getMethodParams() != null; }
/** * The method param type names. * * @return the parameter types */ public Iterator<String> getParams() { Collection<String> params = methodDelegate.getMethodParams(); if (params == null) params = Collections.emptySet(); return params.iterator(); }
/** * The method param type names. * * @return the parameter types */ public Iterator<String> getParams() { Collection<String> params = methodDelegate.getMethodParams(); if (params == null) params = Collections.emptySet(); return params.iterator(); }
/** * The method parameters * * @return An array of the method parameter type names */ public String[] getMethodParams() { Collection<String> params = methodDelegate.getMethodParams(); if (params == null) params = Collections.emptySet(); return params.toArray(new String[params.size()]); }
/** * The method parameters * * @return An array of the method parameter type names */ public String[] getMethodParams() { Collection<String> params = methodDelegate.getMethodParams(); if (params == null) params = Collections.emptySet(); return params.toArray(new String[params.size()]); }
public static Method resolveMethod(final MethodMetaData methodData, final Class<?> componentClass, final DeploymentReflectionIndex reflectionIndex) throws DeploymentUnitProcessingException { return resolveMethod(methodData.getMethodName(), methodData.getMethodParams(), componentClass, reflectionIndex); }
/** * Whether this matches * * @param methodName the method name * @param params the parameters * @param interfaceType the interface type * @param bestMatch the previous best match * @return best match */ public MethodMetaData bestMatch(String methodName, String[] params, MethodInterfaceType interfaceType, MethodMetaData bestMatch) { if (isEmpty()) return bestMatch; for (MethodMetaData method : this) { if (method.matches(methodName, params, interfaceType)) { // No previous best match if (bestMatch == null) bestMatch = method; // better match because the previous was a wildcard else if ("*".equals(bestMatch.getMethodName())) bestMatch = method; // better because it specifies parameters else if (method.getMethodParams() != null) bestMatch = method; } } return bestMatch; }
/** * Whether this matches * * @param methodName the method name * @param params the parameters * @param interfaceType the interface type * @param bestMatch the previous best match * @return best match */ public MethodMetaData bestMatch(String methodName, String[] params, MethodInterfaceType interfaceType, MethodMetaData bestMatch) { if (isEmpty()) return bestMatch; for (MethodMetaData method : this) { if (method.matches(methodName, params, interfaceType)) { // No previous best match if (bestMatch == null) bestMatch = method; // better match because the previous was a wildcard else if ("*".equals(bestMatch.getMethodName())) bestMatch = method; // better because it specifies parameters else if (method.getMethodParams() != null) bestMatch = method; } } return bestMatch; }
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()); }
&& existingMethod.getMethodParams().equals(mmd.getMethodParams()))
if (mmd.getMethodParams() != null) params = mmd.getMethodParams().toArray(params); else params = null; if (mmd.getMethodParams() != null) params = mmd.getMethodParams().toArray(params); else params = null;
+ method.getMethodParams() + ") of EJB " + method.getEjbName() + ": " + Arrays.asList(annotation.value())); addAnnotations(RolesAllowed.class, annotation, container, method);
} else { final MethodParametersMetaData methodParams = method.getMethodParams(); } else { final MethodParametersMetaData methodParams = method.getMethodParams();
} else { final MethodParametersMetaData methodParams = method.getMethodParams();