@ SuppressWarnings ( "unchecked" ) public static < T extends Type > T unwrap ( T type ) { Type unwrapped = type ; while ( unwrapped instanceof SerializableTypeProxy ) { unwrapped = ( ( SerializableTypeProxy ) type ) . getTypeProvider ( ) . getType ( ) ; } return ( T ) unwrapped ; }
Unwrap the given type effectively returning the original non - serializable type .