Skip to content

Support type parameter type bounds #7

@cuzfrog

Description

@cuzfrog

Description

Despite target languages generally accept, currently the generic type support does not include type bounds, e.g.:

interface Shape {
  double area();
}
class MyClass<T extends Shape> {
  T shape;
}

AC:

  • annotation processor transformation logic implemented with unit test coverage
  • output logic for all target languages implemented with unit test coverage
  • integration test cases added and verified
  • e2e test cases added and verified; script misc/start-client-servers.sh can be run in another session to bring up local target language RESTful service.
  • client-test cases added; no need to verify locally. Later verfication can be done in CI.

Dev Instructions

  • development documents in doc/ and CI in .github/workflows can offer insight about dev cycles
  • can ignore java8 related part, since this change is not related
  • code in git commit cycle with small but meaningful steps
  • work in dev branch 7_type_bounds
  • do not install local runtimes, assume all installed; call . ./setenv to setup the cmd session

Example Test Case

Above Java code should be converted to below Typescript code:

export interface Shape {
  area: number;
}
export interface MyClass<T extends Shape> {
    value: T;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn improvement on a feature

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions