I believe you can extract the typename to a superclass:

```
public abstract class Definition {
    private String typename;
    
    public Definition(String typename) {
        this.typename = typename;
    }

    public String getTypename() {
        return typename;
    }
}
```