xsdata.codegen.utils module¶
-
class
xsdata.codegen.utils.
ClassUtils
[source]¶ Bases:
object
-
classmethod
copy_attributes
(source, target, extension)[source]¶ Copy the attributes from the source class to the target class and remove the extension that links the two classes together.
The new attributes are prepended in the list unless if they are supposed to be last in a sequence.
-
classmethod
clone_attribute
(attr, restrictions, prefix=None)[source]¶ Clone the given attribute and merge its restrictions with the given instance.
Prepend the given namespace prefix to the attribute name if available.
- Parameters
attr (
Attr
) –restrictions (
Restrictions
) –
- Return type
-
classmethod