如果我有:
<itemtype code="A">
<attributes>
<attribute qualifier="attributeA" type="java.lang.String">
<modifiers .../>
</attribute>
</attributes>
</itemtype>
而
<itemtype code="B" extends="A">
<attributes>
<attribute qualifier="attributeA" redeclare="true" type="ATTENTION.HERE">
<modifiers .../>
</attribute>
</attributes>
</itemtype>
如果我使用 "redeclare=true "会怎样?这会让我改变属性的类型吗?例如,我用 "redeclare=true "来代替 type="ATTENTION.HERE"
,我可以写 type="java.lang.Integer
? 如果是的话,这个 "属性A "会不会是类型为 Integer
只针对B?
见 重新声明属性 部中 https:/help.sap.comviewerd0224eca81e249cb821f2cdf45a82ace2005en-US8bffa9cc86691014bb70ac2d012708bc.html。
基本上你只能让它成为父类定义的一个更具体的子类型。