@Override public MethodConstraintMappingContext method(String name, Class<?>... parameterTypes) { Contracts.assertNotNull( name, MESSAGES.methodNameMustNotBeNull() ); Method method = run( GetDeclaredMethod.action( beanClass, name, parameterTypes ) ); if ( method == null || method.getDeclaringClass() != beanClass ) { throw LOG.getBeanDoesNotContainMethodException( beanClass, name, parameterTypes ); } if ( configuredMembers.contains( method ) ) { throw LOG.getMethodHasAlreadyBeConfiguredViaProgrammaticApiException( beanClass, ExecutableHelper.getExecutableAsString( name, parameterTypes ) ); } MethodConstraintMappingContextImpl context = new MethodConstraintMappingContextImpl( this, method ); configuredMembers.add( method ); executableContexts.add( context ); return context; }
@Override public MethodConstraintMappingContext method(String name, Class<?>... parameterTypes) { Contracts.assertNotNull( name, MESSAGES.methodNameMustNotBeNull() ); Method method = run( GetDeclaredMethod.action( beanClass, name, parameterTypes ) ); if ( method == null || method.getDeclaringClass() != beanClass ) { throw log.getBeanDoesNotContainMethodException( beanClass, name, Arrays.asList( parameterTypes ) ); } if ( configuredMembers.contains( method ) ) { throw log.getMethodHasAlreadyBeConfiguredViaProgrammaticApiException( beanClass, ExecutableElement.getExecutableAsString( name, parameterTypes ) ); } MethodConstraintMappingContextImpl context = new MethodConstraintMappingContextImpl( this, method ); configuredMembers.add( method ); executableContexts.add( context ); return context; }
throw LOG.getBeanDoesNotContainMethodException( beanClass, methodName,
throw log.getBeanDoesNotContainMethodException( beanClass, methodName,