* @return {@code true} if the given type name is used as the type in an as expression
*/
private boolean isTypeNameInAsExpression(TypeName typeName) {
AstNode parent = typeName.getParent();
if (parent instanceof AsExpression) {
AsExpression asExpression = (AsExpression) parent;
return asExpression.getType() == typeName;
}
return false;
}