@ Override public void visitEnd ( ) { if ( name == null || name . length ( ) == 0 ) { reporter . error ( "The 'name' attribute of @Model from " + workbench . getType ( ) . getClassName ( ) + " must be " + "set" ) ; return ; } // Check the type of the field if ( ! Type . getDescriptor ( Crud . class ) . equals ( node . desc ) ) { reporter . warn ( "The type of the field " + field + " from " + workbench . getType ( ) . getClassName ( ) + " should" + " be " + Crud . class . getName ( ) + " because the field is annotated with @Model" ) ; } Element requires = new Element ( "requires" , "" ) ; requires . addAttribute ( new Attribute ( "field" , field ) ) ; requires . addAttribute ( new Attribute ( "filter" , getFilter ( name ) ) ) ; workbench . getElements ( ) . put ( requires , null ) ; }
Generates the element - attribute structure to be added .