in commons-digester3-core/src/main/java/org/apache/commons/digester3/annotations/FromAnnotationsRuleModule.java [185:220]
private void visitElements( final AnnotatedElement... annotatedElements )
{
for ( final AnnotatedElement element : annotatedElements )
{
for ( final Annotation annotation : element.getAnnotations() )
{
handle( annotation, element );
}
if ( element instanceof Constructor || element instanceof Method )
{
Annotation[][] parameterAnnotations;
Class<?>[] parameterTypes;
if ( element instanceof Constructor )
{
// constructor args
final Constructor<?> constructor = (Constructor<?>) element;
parameterAnnotations = constructor.getParameterAnnotations();
parameterTypes = constructor.getParameterTypes();
}
else
{
// method args
final Method method = (Method) element;
parameterAnnotations = method.getParameterAnnotations();
parameterTypes = method.getParameterTypes();
}
for ( int i = 0; i < parameterTypes.length; i++ )
{
visitElements( new MethodArgument( i, parameterTypes[i], parameterAnnotations[i] ) );
}
}
}
}