protected LightweightTypeReference getLightweightType ( XExpression expr ) { final IResolvedTypes resolvedTypes = getResolvedTypes ( expr ) ; final LightweightTypeReference expressionType = resolvedTypes . getActualType ( expr ) ; if ( expr instanceof AnonymousClass ) { final List < LightweightTypeReference > superTypes = expressionType . getSuperTypes ( ) ; if ( superTypes . size ( ) == 1 ) { return superTypes . get ( 0 ) ; } } return expressionType ; }
Replies the inferred type for the given expression .