javaflow
javaflow copied to clipboard
Support type parameters in classes
The following model is not handled correctly:
public class ModelWithTypeParams {
class Child<T> {
private T field;
public T getField() {
return field;
}
}
private Child<String> child1;
private Child<Integer> child2;
public Child<String> getChild1() {
return child1;
}
public Child<Integer> getChild2() {
return child2;
}
}
as I can see, flow supports generics so I think it might be enough if we "simply" generate this:
export type Child<T> = {
field: T
}
export type ModelWithTypeParams = {
child1: Child<string>,
child2: Child<number>
}
But maybe I'm missing something obvious here?
Your proposal seems reasonable :)