private Class < ? > replaceInterface ( Class < ? > clazz ) { if ( clazz . equals ( List . class ) ) { return ArrayList . class ; } if ( clazz . equals ( Set . class ) ) { return HashSet . class ; } if ( clazz . equals ( Map . class ) ) { return HashMap . class ; } return clazz ; }
Replace interface .