in commons-digester3-core/src/main/java/org/apache/commons/digester3/annotations/FromAnnotationsRuleModule.java [183:218]
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<?> construcotr = (Constructor<?>) element;
parameterAnnotations = construcotr.getParameterAnnotations();
parameterTypes = construcotr.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] ) );
}
}
}
}