如果我有:
<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“会发生什么?这会让我改变属性的类型吗?例如,我可以编写type="ATTENTION.HERE"而不是type="java.lang.Integer吗?如果是这样的话,这个"attributeA“是否只适用于B类Integer呢?
发布于 2020-05-18 17:21:57
请参阅https://help.sap.com/viewer/d0224eca81e249cb821f2cdf45a82ace/2005/en-US/8bffa9cc86691014bb70ac2d012708bc.html中的重新声明属性一节
基本上,您只能使它成为父类定义的更具体的子类型。
https://stackoverflow.com/questions/61869687
复制相似问题