Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法重命名 iPojo 实例?
我正在使用工厂来构造实例,因此在 createComponentInstance 的参数中我传递了一个带有实例名称的名称属性。但是在运行时,一旦实例开始运行,我将能够获得更多我想用作名称的信息
我尝试使用 @Property(name="name") 或 @Property(name="instance.name") 在类中添加一个字符串字段,然后将其设置为新名称,但更改未生效
不,您不能重命名实例。
您可以做的是使用可以在运行时更改的第二个属性(“名称”)。