public < T extends ManagedType > T getJaversManagedType ( Class javaClass , Class < T > expectedType ) { JaversType mType = getJaversType ( javaClass ) ; if ( expectedType . isAssignableFrom ( mType . getClass ( ) ) ) { return ( T ) mType ; } else { throw new JaversException ( JaversExceptionCode . MANAGED_CLASS_MAPPING_ERROR , javaClass , mType . getClass ( ) . getSimpleName ( ) , expectedType . getSimpleName ( ) ) ; } }
If given javaClass is mapped to expected ManagedType returns its JaversType