public static CompositeMonitor < ? > newObjectMonitor ( String id , Object obj ) { final TagList tags = getMonitorTags ( obj ) ; List < Monitor < ? > > monitors = new ArrayList <> ( ) ; addMonitors ( monitors , id , tags , obj ) ; final Class < ? > c = obj . getClass ( ) ; final String objectId = ( id == null ) ? DEFAULT_ID : id ; return new BasicCompositeMonitor ( newObjectConfig ( c , objectId , tags ) , monitors ) ; }
Helper function to easily create a composite for all monitor fields and annotated attributes of a given object .