private Method translateMethod(final DeploymentReflectionIndex deploymentReflectionIndex, final OperationAnalysis op) { final Method nonMethod = op.getMethod(); return deploymentReflectionIndex.getClassIndex(nonMethod.getDeclaringClass()).getMethod(nonMethod); }
final Method method = classIndex.getMethod(entry.getKey()); if (method != null) {
final Method method = index.getMethod(ejbActivateIdentifier); if(method != null) { final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder(); final Method method = index.getMethod(ejbPassivateIdentifier); if(method != null) { final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder(); final Method method = index.getMethod(ejbRemoveIdentifier); if(method != null) { final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
@Override protected void handleDeploymentDescriptor(final DeploymentUnit deploymentUnit, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final StatefulComponentDescription description) throws DeploymentUnitProcessingException { final DeploymentReflectionIndex reflectionIndex = deploymentUnit.getAttachment(Attachments.REFLECTION_INDEX); //if we implement SessionSynchronization we can ignore any DD information if (SessionSynchronization.class.isAssignableFrom(componentClass)) { final ClassReflectionIndex classIndex = reflectionIndex.getClassIndex(SessionSynchronization.class); description.setAfterBegin(classIndex.getMethod(void.class, "afterBegin")); description.setAfterCompletion(classIndex.getMethod(void.class, "afterCompletion", boolean.class)); description.setBeforeCompletion(classIndex.getMethod(void.class,"beforeCompletion")); return; } SessionBeanMetaData data = description.getDescriptorData(); if (data instanceof SessionBean31MetaData) { SessionBean31MetaData metaData = (SessionBean31MetaData) data; if (metaData.getAfterBeginMethod() != null) description.setAfterBegin(MethodResolutionUtils.resolveMethod(metaData.getAfterBeginMethod(), componentClass,reflectionIndex)); if (metaData.getAfterCompletionMethod() != null) description.setAfterCompletion(MethodResolutionUtils.resolveMethod(metaData.getAfterCompletionMethod(), componentClass,reflectionIndex)); if (metaData.getBeforeCompletionMethod() != null) description.setBeforeCompletion(MethodResolutionUtils.resolveMethod(metaData.getBeforeCompletionMethod(), componentClass,reflectionIndex)); } } }
final ClassReflectionIndex index = deploymentReflectionIndex.getClassIndex(c); Method method = index.getMethod(Void.TYPE, "ejbTimeout", javax.ejb.Timer.class); if (method != null) {
@Override public Method getMethod(final String methodName, final Class<?> returnType, final Class<?>... parameters) throws NoSuchMethodException { return index.getMethod(returnType, methodName, parameters); }
@Override public Method getMethod(final String methodName, final Class<?> returnType, final Class<?>... parameters) throws NoSuchMethodException { return index.getMethod(returnType, methodName, parameters); }
@Override public Method getMethod(final String methodName, final Class<?> returnType, final Class<?>... parameters) throws NoSuchMethodException { return index.getMethod(returnType, methodName, parameters); }
/** * Get the canonical method declared on this object. * * @param method the method to look up * @return the canonical method object, or {@code null} if no matching method exists */ public Method getMethod(Method method) { return getMethod(method.getReturnType(), method.getName(), method.getParameterTypes()); }
/** * Get the canonical method declared on this object. * * @param method the method to look up * @return the canonical method object, or {@code null} if no matching method exists */ public Method getMethod(Method method) { return getMethod(method.getReturnType(), method.getName(), method.getParameterTypes()); }
/** * Get the canonical method declared on this object. * * @param method the method to look up * @return the canonical method object, or {@code null} if no matching method exists */ public Method getMethod(Method method) { return getMethod(method.getReturnType(), method.getName(), method.getParameterTypes()); }
/** * Get the canonical method declared on this object. * * @param method the method to look up * @return the canonical method object, or {@code null} if no matching method exists */ public Method getMethod(Method method) { return getMethod(method.getReturnType(), method.getName(), method.getParameterTypes()); }
protected Method resolveRemoveMethod(final Class<?> componentClass, final DeploymentReflectionIndex index, final String ejbName) throws DeploymentUnitProcessingException { Class<?> clazz = componentClass; while (clazz != Object.class) { final ClassReflectionIndex<?> classIndex = index.getClassIndex(clazz); Method ret = classIndex.getMethod(Void.TYPE, "ejbRemove"); if (ret != null) { return ret; } clazz = clazz.getSuperclass(); } return null; } }
void verifyFinalizeMethod() { ClassReflectionIndex classReflectionIndex = deploymentReflectionIndex.getClassIndex(endpointClass); Method finalizeMethod = classReflectionIndex.getMethod(void.class, "finalize"); if (finalizeMethod != null) { verificationFailures.add(new ImplementationHasFinalize()); } }
void verifyFinalizeMethod() { ClassReflectionIndex classReflectionIndex = deploymentReflectionIndex.getClassIndex(endpointClass); Method finalizeMethod = classReflectionIndex.getMethod(void.class, "finalize"); if (finalizeMethod != null) { verificationFailures.add(new ImplementationHasFinalize()); } }
private Method resolveEjbMethod(final String userName, final String ejbMethodName, final String returnType, final Class<?> componentClass, final DeploymentReflectionIndex index, final Method method, final String ejbName) throws DeploymentUnitProcessingException { final String name = method.getName().replaceFirst(userName, ejbMethodName); Class<?> clazz = componentClass; while (clazz != Object.class) { final ClassReflectionIndex<?> classIndex = index.getClassIndex(clazz); Method ret = classIndex.getMethod(returnType, name, namesOf(method.getParameterTypes())); if (ret != null) { return ret; } clazz = clazz.getSuperclass(); } throw MESSAGES.failToResolveMethodForHomeInterface(ejbMethodName, method, ejbName); }
private Method translateMethod(final DeploymentReflectionIndex deploymentReflectionIndex, final OperationAnalysis op) { final Method nonMethod = op.getMethod(); return deploymentReflectionIndex.getClassIndex(nonMethod.getDeclaringClass()).getMethod(nonMethod); }
private Method resolveRemoveMethod(final Class<?> componentClass, final DeploymentReflectionIndex index, final String ejbName) throws DeploymentUnitProcessingException { Class<?> clazz = componentClass; while (clazz != Object.class) { final ClassReflectionIndex<?> classIndex = index.getClassIndex(clazz); Method ret = classIndex.getMethod(Void.TYPE, "ejbRemove"); if (ret != null) { return ret; } clazz = clazz.getSuperclass(); } throw MESSAGES.failToResolveEjbRemoveForInterface(ejbName); } }
private boolean classContains(final Class<?> clazz, final MethodIdentifier methodIdentifier) { return clazz != null && (deploymentReflectionIndex.getClassIndex(clazz).getMethod(methodIdentifier) != null || classContains(clazz.getSuperclass(), methodIdentifier)); }
private boolean classContains(final Class<?> clazz, final MethodIdentifier methodIdentifier) { return clazz != null && (deploymentReflectionIndex.getClassIndex(clazz).getMethod(methodIdentifier) != null || classContains(clazz.getSuperclass(), methodIdentifier)); }