// @Component annotations
mojoFieldVisitors = mojoClassVisitor.findFieldWithAnnotation( Component.class );
for ( MojoFieldVisitor mojoFieldVisitor : mojoFieldVisitors )
{
ComponentAnnotationContent componentAnnotationContent =
new ComponentAnnotationContent( mojoFieldVisitor.getFieldName() );
if ( mojoFieldVisitor.getMojoAnnotationVisitor() != null )
{
for ( Map.Entry<String, Object> entry : mojoFieldVisitor.getMojoAnnotationVisitor().getAnnotationValues().entrySet() )
{
String methodName = entry.getKey();
if ( StringUtils.equals( "role", methodName ) )
{
Type type = (Type) entry.getValue();
componentAnnotationContent.setRoleClassName( type.getClassName() );
}
else
{
reflector.invoke( componentAnnotationContent, entry.getKey(),
new Object[]{ entry.getValue() } );
}
}
if ( StringUtils.isEmpty( componentAnnotationContent.getRoleClassName() ) )
{
componentAnnotationContent.setRoleClassName( mojoFieldVisitor.getClassName() );
}
}
mojoAnnotatedClass.getComponents().put( componentAnnotationContent.getFieldName(),
componentAnnotationContent );
}
}
catch ( ReflectorException e )
{