Skip to content

Add the ability to specify a package name for a specific language  #1133

@Blastbit513

Description

@Blastbit513

First of all, thank you for such a cool tool!
I would suggest a feature. I do not know if this is relevant for someone other than me but...
Sometimes it might be useful to specify package name for (for example) Java but at the same time have a different tree structure in cpp or other languages. Like this is supported for struct/class/etc. and fields.

A couple of cases that I can imagine or have faced:

  1. When you want to move an interface to a sub-package/some different package on Java because you want to wrap it with some additional language-specific code and "hide" the generated. But at the same time have it at the right level on Cpp.
    I know it might be a trait of bad design but not always it is possible to make it right for every platform and not always "internal" modifier is enough.
@Java("my.lib.internal")
package my.lib

interface Handler {
 //...
}
  1. When you want to place some types into sub-package following some package structure guideline for a particular language but still have them in the same or different package for others langs.
@Java("my.lib.service.model")
package my.lib.service

struct Entry {
 //...
}

I'm sure it might be laborious to implement it and cover it with tests. It's just a feature suggestion. However, it would add more flexibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions