public static Feed buildFeed ( FeedDesc feedDesc ) { Feed feed = null ; NitFactory nitFactory = new NitFactory ( ) ; NitDesc nitDesc = nitDescFromDynamic ( feedDesc ) ; nitDesc . setConstructorParameters ( new Class [ ] { Map . class } ) ; nitDesc . setConstructorArguments ( new Object [ ] { feedDesc . getProperties ( ) } ) ; try { feed = nitFactory . construct ( nitDesc ) ; } catch ( NitException e ) { throw new RuntimeException ( e ) ; } return feed ; }
Build a feed using reflection