public static Expression getUnwrappedExpression ( Expression expression ) { while ( expression instanceof ImplicitTypeAsExpression ) { expression = ( ( ImplicitTypeAsExpression ) expression ) . getLHS ( ) ; } return expression ; }
If the expression is wrapped in ImplicitTypeAsExpressions this will will unwrap them back down to the original expression .