protected Class < ? > defineCollectionClass ( ParameterizedTypeName collectionTypeName ) { if ( collectionTypeName . rawType . toString ( ) . startsWith ( collectionClazz . getCanonicalName ( ) ) ) { return defaultClazz ; } else if ( collectionTypeName . rawType . toString ( ) . startsWith ( SortedMap . class . getCanonicalName ( ) ) ) { return TreeMap . class ; } else if ( collectionTypeName . rawType . toString ( ) . startsWith ( SortedSet . class . getCanonicalName ( ) ) ) { return TreeSet . class ; } try { return Class . forName ( collectionTypeName . rawType . toString ( ) ) ; } catch ( ClassNotFoundException e ) { e . printStackTrace ( ) ; throw new KriptonClassNotFoundException ( e ) ; } }
Define collection class .