if (mapName == null || !mapName.startsWith("$SwitchMap$") || !(arrayOwner instanceof TypeReferenceExpression)) {
return super.visitSwitchStatement(node, data);
}
final TypeReferenceExpression enclosingTypeExpression = (TypeReferenceExpression) arrayOwner;
final TypeReference enclosingType = enclosingTypeExpression.getType().getUserData(Keys.TYPE_REFERENCE);
if (!isSwitchMapWrapper(enclosingType) || !(argument instanceof InvocationExpression)) {
return super.visitSwitchStatement(node, data);
}
final InvocationExpression invocation = (InvocationExpression) argument;
final Expression invocationTarget = invocation.getTarget();
if (!(invocationTarget instanceof MemberReferenceExpression)) {
return super.visitSwitchStatement(node, data);
}
final MemberReferenceExpression memberReference = (MemberReferenceExpression) invocationTarget;
if (!"ordinal".equals(memberReference.getMemberName())) {
return super.visitSwitchStatement(node, data);
}
final String enclosingTypeName = enclosingType.getInternalName();
SwitchMapInfo info = _switchMaps.get(enclosingTypeName);
if (info == null) {
_switchMaps.put(enclosingTypeName, info = new SwitchMapInfo(enclosingTypeName));
final TypeDefinition resolvedType = enclosingType.resolve();
if (resolvedType != null) {
AstBuilder astBuilder = context.getUserData(Keys.AST_BUILDER);
if (astBuilder == null) {