Skip to content

Add API support to move model class to another class or package #957

@Tomas-Kraus

Description

@Tomas-Kraus

Currently it is not possible to manipulate with Code Model in a way that JDefinedClass is moved to another class or package. For that:

  • JDefinedClass and JPackage should implement method _class(JClass anotherClass), i.e. opportunity to add existing class.
  • The owner of anotherClass should be set to new container, thus there is a need for JDefinedClass#setOuter(JClassContainer newOuter)
  • If class is moved to package, its static modifier should be reset, thus there is a need for JMod#setStatic(boolean newValue).

Affected Versions

[2.2.6]

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions