in commons-digester3-core/src/main/java/org/apache/commons/digester3/annotations/FromAnnotationsRuleModule.java [110:156]
protected final void bindRulesFrom( final Class<?> type )
{
if ( type == null || type.getPackage().getName().startsWith( JAVA_PACKAGE )
|| rulesBinder.isAlreadyBound( type ) )
{
return;
}
// TYPE
visitElements( type );
if ( !type.isInterface() )
{
// CONSTRUCTOR
visitElements( new PrivilegedAction<Constructor<?>[]>()
{
@Override
public Constructor<?>[] run()
{
return type.getDeclaredConstructors();
}
} );
// FIELD
visitElements( new PrivilegedAction<Field[]>()
{
@Override
public Field[] run()
{
return type.getDeclaredFields();
}
} );
}
// METHOD
visitElements( new PrivilegedAction<Method[]>()
{
@Override
public Method[] run()
{
return type.getDeclaredMethods();
}
} );
rulesBinder.markAsBound( type );
bindRulesFrom( type.getSuperclass() );
}