private boolean hasSameSignatureAsExisting(java.lang.reflect.Method toMatch, Set<java.lang.reflect.Method> methods) { boolean sameSignature = false; for(java.lang.reflect.Method m : methods) { if( TypeUtil.sameMethodSignature(m, toMatch) ) { sameSignature = true; break; } } return sameSignature; }
private boolean hasSameSignatureAsExisting(java.lang.reflect.Method toMatch, Set<java.lang.reflect.Method> methods) { boolean sameSignature = false; for(java.lang.reflect.Method m : methods) { if( TypeUtil.sameMethodSignature(m, toMatch) ) { sameSignature = true; break; } } return sameSignature; }
private boolean implMethodMatchesInvInfoMethod (Method invInfoMethod, String methodIntf, Method implMethod) { boolean match = false; if( methodIntf.equals(MethodDescriptor.EJB_BEAN) ) { // Declaring class must match in addition to signature match = ( implMethod.getDeclaringClass().equals(invInfoMethod.getDeclaringClass()) && TypeUtil.sameMethodSignature(implMethod, invInfoMethod) ); } else { match = Modifier.isPublic(implMethod.getModifiers()) && Modifier.isPublic(invInfoMethod.getModifiers()) && TypeUtil.sameMethodSignature(implMethod, invInfoMethod); } return match; }
private boolean implMethodMatchesInvInfoMethod (Method invInfoMethod, String methodIntf, Method implMethod) { boolean match = false; if( methodIntf.equals(MethodDescriptor.EJB_BEAN) ) { // Declaring class must match in addition to signature match = ( implMethod.getDeclaringClass().equals(invInfoMethod.getDeclaringClass()) && TypeUtil.sameMethodSignature(implMethod, invInfoMethod) ); } else { match = Modifier.isPublic(implMethod.getModifiers()) && Modifier.isPublic(invInfoMethod.getModifiers()) && TypeUtil.sameMethodSignature(implMethod, invInfoMethod); } return match; }
public boolean isAsynchronousMethod(Method m) { boolean async = false; for(MethodDescriptor next : asyncMethods) { Method nextMethod = next.getMethod(this); if( (nextMethod != null) && TypeUtil.sameMethodSignature(m, nextMethod)) { async = true; break; } } return async; }
public boolean isAsynchronousMethod(Method m) { boolean async = false; for(MethodDescriptor next : asyncMethods) { Method nextMethod = next.getMethod(this); if( (nextMethod != null) && TypeUtil.sameMethodSignature(m, nextMethod)) { async = true; break; } } return async; }
private boolean methodOverridden(Method m, Class declaringSuperClass, Class leafClass) { Class nextClass = leafClass; boolean overridden = false; if( Modifier.isPrivate(m.getModifiers())) { return false; } while((nextClass != declaringSuperClass) && (nextClass != Object.class)) { for(Method nextMethod : nextClass.getDeclaredMethods()) { if( !Modifier.isPrivate(nextMethod.getModifiers()) && TypeUtil.sameMethodSignature(m, nextMethod) ) { overridden = true; break; } } if( overridden ) { break; } nextClass = nextClass.getSuperclass(); } return overridden; }
private boolean methodOverridden(Method m, Class declaringSuperClass, Class leafClass) { Class nextClass = leafClass; boolean overridden = false; if( Modifier.isPrivate(m.getModifiers())) { return false; } while((nextClass != declaringSuperClass) && (nextClass != Object.class)) { for(Method nextMethod : nextClass.getDeclaredMethods()) { if( !Modifier.isPrivate(nextMethod.getModifiers()) && TypeUtil.sameMethodSignature(m, nextMethod) ) { overridden = true; break; } } if( overridden ) { break; } nextClass = nextClass.getSuperclass(); } return overridden; }
public Class getDeclaringClass(MethodDescriptor md) { Method method = md.getMethod(getDescriptor()); Class declaringClass = null; for (Method m : methods) { if (TypeUtil.sameMethodSignature(m, method)) { declaringClass = m.getDeclaringClass(); } } return declaringClass; }
public Class getDeclaringClass(MethodDescriptor md) { Method method = md.getMethod(getDescriptor()); Class declaringClass = null; for (Method m : methods) { if (TypeUtil.sameMethodSignature(m, method)) { declaringClass = m.getDeclaringClass(); } } return declaringClass; }
private boolean matchesExistingAccessTimeoutMethod(Method methodToMatch, EjbSessionDescriptor desc) { List<MethodDescriptor> timeoutMethods = desc.getAccessTimeoutMethods(); boolean match = false; for (MethodDescriptor next : timeoutMethods) { Method m = next.getMethod(desc); if (( m.getDeclaringClass().equals(methodToMatch.getDeclaringClass()) ) && TypeUtil.sameMethodSignature(m, methodToMatch) ) { match = true; break; } } return match; }
private boolean matchesExistingReadOrWriteLockMethod(Method methodToMatch, EjbSessionDescriptor desc) { List<MethodDescriptor> lockMethods = desc.getReadAndWriteLockMethods(); boolean match = false; for (MethodDescriptor next : lockMethods) { Method m = next.getMethod(desc); if( ( m.getDeclaringClass().equals(methodToMatch.getDeclaringClass()) ) && TypeUtil.sameMethodSignature(m, methodToMatch) ) { match = true; break; } } return match; }
private boolean matchesExistingAccessTimeoutMethod(Method methodToMatch, EjbSessionDescriptor desc) { List<MethodDescriptor> timeoutMethods = desc.getAccessTimeoutMethods(); boolean match = false; for (MethodDescriptor next : timeoutMethods) { Method m = next.getMethod(desc); if (( m.getDeclaringClass().equals(methodToMatch.getDeclaringClass()) ) && TypeUtil.sameMethodSignature(m, methodToMatch) ) { match = true; break; } } return match; }
private boolean matchesExistingReadOrWriteLockMethod(Method methodToMatch, EjbSessionDescriptor desc) { List<MethodDescriptor> lockMethods = desc.getReadAndWriteLockMethods(); boolean match = false; for (MethodDescriptor next : lockMethods) { Method m = next.getMethod(desc); if( ( m.getDeclaringClass().equals(methodToMatch.getDeclaringClass()) ) && TypeUtil.sameMethodSignature(m, methodToMatch) ) { match = true; break; } } return match; }
MethodDescriptor nextDesc = (MethodDescriptor) next; Method m = nextDesc.getMethod(ejbDesc); if( TypeUtil.sameMethodSignature(m, annMethod) && ejbDesc.getContainerTransactionFor(nextDesc) == null ) { Method m = lcd.getLifecycleCallbackMethodObject(loader); MethodDescriptor md = new MethodDescriptor(m, MethodDescriptor.LIFECYCLE_CALLBACK); if (TypeUtil.sameMethodSignature(m, annMethod) && ejbDesc.getContainerTransactionFor(md) == null) {
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts) throws AnnotationProcessorException { TransactionAttribute taAn = (TransactionAttribute) ainfo.getAnnotation(); for (EjbContext ejbContext : ejbContexts) { EjbDescriptor ejbDesc = ejbContext.getDescriptor(); ContainerTransaction containerTransaction = getContainerTransaction(taAn.value()); if (ElementType.TYPE.equals(ainfo.getElementType())) { ejbContext.addPostProcessInfo(ainfo, this); } else { Method annMethod = (Method) ainfo.getAnnotatedElement(); Set txBusMethods = ejbDesc.getTxBusinessMethodDescriptors(); for (Object next : txBusMethods) { MethodDescriptor nextDesc = (MethodDescriptor) next; Method m = nextDesc.getMethod(ejbDesc); if( TypeUtil.sameMethodSignature(m, annMethod) && ejbDesc.getContainerTransactionFor(nextDesc) == null ) { // override by xml ejbDesc.setContainerTransactionFor (nextDesc, containerTransaction); } } } } return getDefaultProcessedResult(); }
if (TypeUtil.sameMethodSignature(m, annMethod)) { processEjbMethodSecurity(authAnnotation, md, ejbDesc);
if (TypeUtil.sameMethodSignature(m, annMethod)) { processEjbMethodSecurity(authAnnotation, md, ejbDesc);