public static void assertOneParameter ( final Method method , Class < ? extends Annotation > annotation ) { if ( method . getParameterTypes ( ) . length != 1 ) { throw annotation == null ? MESSAGES . methodHasToDeclareExactlyOneParameter ( method ) : MESSAGES . methodHasToDeclareExactlyOneParameter2 ( method , annotation ) ; } }
Asserts method have exactly one parameter .