Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.Este conteúdo não está disponível no idioma selecionado.
36.5. Customizing Fixed Value Attribute Mapping
Overview Copiar o linkLink copiado para a área de transferência!
globalBindings
customization element. You can also customize the mapping of fixed value attributes to Java constants at a more localized level using the property
element.
Global customization Copiar o linkLink copiado para a área de transferência!
globalBinding
element's fixedAttributeAsConstantProperty
attribute. Setting this attribute to true
instructs the code generator to map any attribute defined using fixed
attribute to a Java constant.
Example 36.21. in-Line Customization to Force Generation of Constants
Example 36.22. Binding File to Force Generation of Constants
Local mapping Copiar o linkLink copiado para a área de transferência!
property
element's fixedAttributeAsConstantProperty
attribute. Setting this attribute to true
instructs the code generator to map any attribute defined using fixed
attribute to a Java constant.
Example 36.23. In-Line Customization to Force Generation of Constants
Example 36.24. Binding File to Force Generation of Constants
Java mapping Copiar o linkLink copiado para a área de transferência!
fixed
attribute, the attribute is mapped to a Java constant, as shown in Example 36.25, “Mapping of a Fixed Value Attribute to a Java Constant”.
Example 36.25. Mapping of a Fixed Value Attribute to a Java Constant
@XmlAttribute public final static type NAME = value;
@XmlAttribute
public final static type NAME = value;
attribute
element's name
attribute to all capital letters.
attribute
element's fixed
attribute.
Example 36.26. Fixed Value Attribute Mapped to a Java Constant