-
Notifications
You must be signed in to change notification settings - Fork 200
Module Obj C
The Objective C module generates Objective C classes and (de)serialization functions that can be used in conjunction with libxml2 to (de)serialize the REST resources as they are represented as XML data.
The Objective C module is configured with the obj-c
element under the modules
element of the enunciate configuration file. It supports the following attributes:
attribute | description |
---|---|
label |
The "label" attribute is the label for the Objective C API. This is the name by which the file will be identified (producing [label].m and [label].h). By default the label is the same as the Enunciate project label. |
forceEnable |
The "forceEnable" attribute is used to force-enable the Objective C module. By default, the Objective C module is enabled only if REST endpoints are found in the project. |
enumConstantNamePattern |
The "enumConstantNamePattern" attribute defines the format string for converting an enum constant name to a unique c-style constant name. The arguments passed to the format string are: (1) the project label (2) the namespace id of the type definition (3) the name of the type definition (4) the NOT decapitalized annotation-specified client name of the type declaration (5) the decapitalized annotation-specified client name of the type declaration (6) the NOT-decapitalized simple name of the type declaration (7) the decapitalized simple name of the type declaration (8) the package identifier (9) the annotation-specified client name of the enum contant (10) the simple name of the enum constant. All tokens will be "scrubbed" by replacing any non-word character with the "" character. The default value for this pattern is "%1$S%2$S_%3$S_%9$S". |
typeDefinitionNamePattern |
The "typeDefinitionNamePattern" attribute defines the format string for converting an type definition name to a unique c-style name. The arguments passed to the format string are: (1) the project label (2) the namespace id of the type definition (3) the name of the type definition (4) the NOT decapitalized annotation-specified client name of the type declaration (5) the decapitalized annotation-specified client name of the type declaration (6) the NOT-decapitalized simple name of the type declaration (7) the decapitalized simple name of the type declaration (8) the package identifier. All tokens will be "scrubbed" by replacing any non-word character with the "_" character. The default value for this pattern is "%1$S%2$S%4$s". |
packageIdentifierPattern |
The "packageIdentifierPattern" attribute defines the format string for creating a unique package identifier for a given package. The arguments passed to the format string will be each subpackage. So, for package "org.codehaus.enunciate.samples.c", The arguments are (1) org (2) codehaus (3) enunciate (4) samples (5) c. The default package identifier is the package name. The package identifier is in turn passed as an argument to the "enumConstantNamePattern" and to the "typeDefinitionNamePattern". |
translateIdTo |
The "translateIdTo" attribute specifies what to use as the name of an accessor when in Java it's named 'id' (which is a keyword in Objective C). |
separateCommonCode |
The "separateCommonCode" attribute tells Enunciate to keep the code that is common to all Enunciate-generated projects separate from the code that is generated specifically for this project. Default: true . |
The obj-c
element supports the following child elements:
In addition to the attributes specified above, the Objective C module configuration supports an arbitrary number of "package" child elements, used to explicitly assign package identifiers to each package. The "package" child element supports a "name" attribute (used to name the package) and an "identifier" attribute.
Facet configuration for the module. See Facets.