Package org.faktorips.runtime
Class IpsEnumToXmlWriter
java.lang.Object
org.faktorips.runtime.IpsEnumToXmlWriter
This class is used in generated code for enums to write their values to XML when the generator
setting "Generate toXml Support" is activated.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIpsEnumToXmlWriter(IRuntimeRepository repository, Class<?> enumClass) To save an extensible enum to XML, all instances need to be loaded from theIRuntimeRepositorytherefore we require non-nullparameters.IpsEnumToXmlWriter(IRuntimeRepository repository, Class<?> enumClass, List<?> enumValues) To save an extensible enum to XML, all instances need to be loaded from theIRuntimeRepositorytherefore we require non-nullparameters. -
Method Summary
-
Field Details
-
XML_ELEMENT_ENUMATTRIBUTEVALUE
- See Also:
-
-
Constructor Details
-
IpsEnumToXmlWriter
To save an extensible enum to XML, all instances need to be loaded from theIRuntimeRepositorytherefore we require non-nullparameters.- Parameters:
repository- the repositoryenumClass- the enum class
-
IpsEnumToXmlWriter
To save an extensible enum to XML, all instances need to be loaded from theIRuntimeRepositorytherefore we require non-nullparameters.- Parameters:
repository- the repositoryenumClass- the enum classenumValues- the value of the enum type as list
-
-
Method Details
-
toXml
Creates an XMLElementthat represents this enums data.- Parameters:
document- a document, that can be used to create XML elements.- Throws:
UnsupportedOperationException- if the support for toXml ("Generate toXml Support") is not activated in the Faktor-IPS standard builder.
-