Alternative use case for type switching for strong typed languages
Given a simple TLV-style type switching example:

```yaml
seq:
  - id: type
    type: u1
  - id: len_body
    type: u1
  - id: body
    size: len_body
    type:
      switch-on: type
      cases:
        1: foo
        2: bar
```

This actually works ok for many use cases, but in strongly typed languages, in case if you want to bulk process such types and actually just do something on every one of the instances of these "body" types, it becomes pretty tedious. We have to :

```java
KaitaiStruct someBody = obj.body();
if (type == 1) {
    Foo foo = (Foo) someBody;
    // work on foo
} else if (type == 2) {
    Bar bar = (Bar) someBody;
    // work on bar
}
```

A simple alternative solution for that might be:

1. KS generating an interface like that:

```java
interface BodyProcessor {
    void processFoo(Foo body);
    void processBar(Bar body);
    void rawProcess(byte[] buf);
}
```

2. KS generating a special method that will invoke processing for a `body` attribute with a given set of processors:

```java
void _process_body(BodyProcessor processor) {
    if (type == 1) {
        processor.processFoo((Foo) body());
    } else if (type == 2) {
        processor.processBar((Bar) body());
    } else {
        processor.rawProcess((byte[]) body());
    }
}
```

3. End-users implementing these `processFoo` / `processBar` / `rawProcess` methods in their code, and doing a single invocation of

```java
obj._process_body(myBodyProcessor);
```