public static String toMetaFieldInfoString ( Object obj ) { StringBuffer buf = new StringBuffer ( 100 ) ; MetaFieldInfo [ ] fields = toMetaFieldInfoArray ( obj , null , true ) ; for ( int i = 0 ; i < fields . length ; i ++ ) { MetaFieldInfo field = fields [ i ] ; buf . append ( field . name ) ; buf . append ( "=" ) ; // if the field's actual value is non-null and of type String if ( field . actualValue != null && field . actualValue . getClass ( ) . equals ( String . class ) ) { buf . append ( ' ' ) ; buf . append ( field . value ) ; buf . append ( ' ' ) ; } else { buf . append ( field . value ) ; } // if not last element, delimit with a comma if ( i + 1 < fields . length ) buf . append ( "," ) ; } return buf . toString ( ) ; }
Creates a string for an object based on the MetaField annotations .