@ SuppressWarnings ( "unchecked" ) public < T > EntityMetadata < T > getMetadataForEntity ( final T obj ) throws IllegalArgumentException { // Type erasure sucks return ( EntityMetadata < T > ) this . getMetadata ( obj . getClass ( ) ) ; }
Named differently so you don t accidentally use the Object form