Skip to content

Add option for classes to never be imported #51

@WonderCsabo

Description

@WonderCsabo

In some cases, the convention for a certain class is to never be imported, but always use its fully qualified class name when referencing it or any of its members. In the Android world, such a class is the android.R class, which contains resource identifiers for the system, and it should not be confused with the project R class which gets imported. For example:

package example.my.project;

public class MyActivity extends Activity {

  void someMethod() {
    String system = getString(android.R.string.some_string);
  }
}

It would be nice to add an option to JCodeModel to support this.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions