View Javadoc
1   /*
2    * Redistribution and use of this software and associated documentation
3    * ("Software"), with or without modification, are permitted provided
4    * that the following conditions are met:
5    *
6    * 1. Redistributions of source code must retain copyright
7    *    statements and notices.  Redistributions must also contain a
8    *    copy of this document.
9    *
10   * 2. Redistributions in binary form must reproduce the
11   *    above copyright notice, this list of conditions and the
12   *    following disclaimer in the documentation and/or other
13   *    materials provided with the distribution.
14   *
15   * 3. The name "Exolab" must not be used to endorse or promote
16   *    products derived from this Software without prior written
17   *    permission of Intalio, Inc.  For written permission,
18   *    please contact info@exolab.org.
19   *
20   * 4. Products derived from this Software may not be called "Exolab"
21   *    nor may "Exolab" appear in their names without prior written
22   *    permission of Intalio, Inc. Exolab is a registered
23   *    trademark of Intalio, Inc.
24   *
25   * 5. Due credit should be given to the Exolab Project
26   *    (http://www.exolab.org/).
27   *
28   * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS
29   * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
30   * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
31   * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
32   * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
33   * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
34   * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
35   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
37   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
39   * OF THE POSSIBILITY OF SUCH DAMAGE.
40   *
41   * Copyright 1999-2003 (C) Intalio, Inc. All Rights Reserved.
42   *
43   * This file was originally developed by Keith Visco during the
44   * course of employment at Intalio Inc.
45   * All portions of this file developed by Keith Visco after Jan 19 2005 are
46   * Copyright (C) 2005 Keith Visco. All Rights Reserved.
47   *
48   * $Id:  $
49   */
50  package org.exolab.castor.builder;
51  
52  import java.io.PrintWriter;
53  import java.util.Properties;
54  
55  import org.exolab.castor.builder.binding.BindingException;
56  import org.exolab.castor.builder.binding.BindingLoader;
57  import org.exolab.castor.builder.factory.FieldInfoFactory;
58  import org.exolab.castor.util.CommandLineOptions;
59  import org.xml.sax.InputSource;
60  
61  /**
62   * Main line method for command-line invokation of the source generation tool.
63   * Because this class exists only to provide a main(String[]) for command-line
64   * use, all methods are static.
65   *
66   * @author <a href="mailto:kvisco@intalio.com">Keith Visco</a> - Main author.
67   * @author <a href="mailto:blandin@intalio.com">Arnaud Blandin</a> - Contributions.
68   * @author <a href="mailto:nsgreen@thazar.com">Nathan Green</a> - Contributions.
69   * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a> - Cut out of SourceGenerator.java
70   * @version $Revision: 0000 $ $Date: $
71   */
72  public final class SourceGeneratorMain {
73      //--------------------------/
74      //- Command line arguments -/
75      //--------------------------/
76  
77      private static final String ARGUMENT_BINDING_FILENAME          = "binding-file";
78      private static final String ARGUMENT_CASE_INSENSITIVE          = "case-insensitive";
79      private static final String ARGUMENT_DESTINATION_DIR           = "dest";
80      private static final String ARGUMENT_DISABLE_DESCRIPTORS       = "nodesc";
81      private static final String ARGUMENT_FORCE                     = "f";
82      private static final String ARGUMENT_GENERATE_IMPORTED_SCHEMAS = "generateImportedSchemas";
83      private static final String ARGUMENT_GENERATE_MAPPING          = "gen-mapping";
84      private static final String ARGUMENT_HELP                      = "h";
85      private static final String ARGUMENT_INPUT                     = "i";
86      private static final String ARGUMENT_INPUT_SOURCE              = "is";
87      private static final String ARGUMENT_LINE_SEPARATOR            = "line-separator";
88      private static final String ARGUMENT_NOMARSHALL                = "nomarshall";
89      private static final String ARGUMENT_PACKAGE                   = "package";
90      private static final String ARGUMENT_RESOURCES_DESTINATION_DIR = "resourcesDestination";
91      private static final String ARGUMENT_SAX1                      = "sax1";
92      private static final String ARGUMENT_TESTABLE                  = "testable";
93      private static final String ARGUMENT_TYPES                     = "types";
94      private static final String ARGUMENT_TYPES_DEPRECATED          = "type-factory";
95      private static final String ARGUMENT_TYPES_JAVA2               = "j2";
96      private static final String ARGUMENT_VERBOSE                   = "verbose";
97      private static final String ARGUMENT_FAIL_ON_ERROR             = "fail";
98      private static final String ARGUMENT_NAME_CONFLICT_STRATEGY    = "nameConflictStrategy";
99      private static final String ARGUMENT_NAME_JCLASSPRINTER        = "classPrinter";    
100     private static final String ARGUMENT_USE_OLD_FIELD_NAMING      = "useOldFieldNaming";
101 
102     private static final String ARG_VALUE_LINE_SEPARATION_MAC      = "mac";
103     private static final String ARG_VALUE_LINE_SEPARATION_UNIX     = "unix";
104     private static final String ARG_VALUE_LINE_SEPARATION_WIN      = "win";
105 
106     //-------------------------/
107     //- Command line messages -/
108     //-------------------------/
109 
110     /** Message used when descriptor creation is disabled. */
111     private static final String DISABLE_DESCRIPTORS_MSG =
112         "Disabling generation of Class descriptors.";
113 
114     /** Message used when marshaling methods creation is disabled. */
115     private static final String DISABLE_MARSHALL_MSG =
116         "Disabling generation of Marshaling framework methods (marshal, unmarshal, validate).";
117 
118     /** Message used when implementing CastorTestable. */
119     private static final String CASTOR_TESTABLE_MSG =
120         "The generated classes will implement org.castor.xmlctf.CastorTestable.";
121 
122     /** Message used when using SAX1. */
123     private static final String SAX1_MSG =
124         "The generated classes will use SAX 1.";
125 
126     private static final String GENERATE_IMPORT_MSG =
127         "Imported XML Schemas will be processed automatically.";
128 
129     private static final String CASE_INSENSITIVE_MSG =
130         "The generated classes will use a case insensitive method "
131         + "for looking up enumerated type values.";
132 
133     private static final String TYPE_FACTORY_ARG_MSG =
134         "The argument '-type-factory' is deprecated; please use '-types' in its place.";
135 
136     private static final String SUPPRESS_NON_FATAL_WARN_MSG =
137         "Suppressing non fatal warnings.";
138 
139     private static final String GENERATING_MAPPING_FILE_MSG =
140         "Generating mapping file: ";
141 
142     private static final String BINDING_FILE_ERROR1_MSG =
143         "Unable to load binding file ";
144 
145     private static final String BINDING_FILE_ERROR2_MSG =
146         " due to the following Exception:";
147 
148     private static final String BINDING_FILE_ERROR3_MSG =
149         "No binding file will be used.";
150 
151     private static final String INVALID_TYPES_OPTION_MSG =
152         "Invalid option for '-types': ";
153 
154     private static final String DEFAULT_FIELD_INFO_MSG =
155         "Using default source generator types.";
156 
157     private static final String LINE_SEPARATION_WIN_MSG =
158         "Using Windows style line separation.";
159 
160     private static final String LINE_SEPARATION_UNIX_MSG =
161         "Using UNIX style line separation.";
162 
163     private static final String LINE_SEPARATION_MAC_MSG =
164         "Using Macintosh style line separation.";
165 
166     private static final String DEFAULT_LINE_SEPARATOR_MSG =
167         "Using default line separator for this platform";
168 
169     private static final String INVALID_LINE_SEPARATOR_MSG =
170         "Invalid option for line-separator: ";
171 
172     private static final String NAME_CONFLICT_STRATEGY_MSG =
173         "Using name conflict strategy ";
174 
175     private static final String JCLASSPRINTER_TYPE_MSG =
176         "Using JClass printing type ";
177 
178     private static final String USING_SEPARATE_RESOURCES_DIRECTORY =
179         "Using a separate destination for resources.";
180 
181     private static final String USE_OLD_FIELD_NAMING_MSG = 
182           "Using old Java field naming conventions";
183 
184     private static final String USE_NEW_FIELD_NAMING_MSG = 
185           "Using new Java field naming conventions";
186 
187     /** The full set of command-line options. */
188     private static final CommandLineOptions ALL_OPTIONS     = setupCommandLineOptions();
189     
190     /**
191      * As a static utility class, we want a private constructor.
192      */
193     private SourceGeneratorMain() {
194         // Private constructor
195     }
196 
197     //////////////////
198     //  MAIN METHOD //
199     //////////////////
200 
201     /**
202      * Parses the command line, converting everything into the proper form for
203      * the source generation main class, then invokes source generation.
204      *
205      * @param args the String[] consisting of the command line arguments
206      */
207     public static void main(final String[] args) {
208         //-- Process the specified command line options
209         Properties options = ALL_OPTIONS.getOptions(args);
210 
211         //-- check for help option
212         if (options.getProperty(ARGUMENT_HELP) != null) {
213             PrintWriter pw = new PrintWriter(System.out, true);
214             ALL_OPTIONS.printHelp(pw);
215             return;
216         }
217 
218         //-- Make sure we have a schema to work on
219         String schemaFilename = options.getProperty(ARGUMENT_INPUT);
220         String schemaURL = options.getProperty(ARGUMENT_INPUT_SOURCE);
221         
222         if (schemaFilename == null && schemaURL == null) {
223             System.out.println(SourceGenerator.APP_NAME);
224             ALL_OPTIONS.printUsage(new PrintWriter(System.out));
225             return;
226         }
227 
228         // Instantiate our SourceGenerator
229         FieldInfoFactory factory = getTypeFactory(options);
230         SourceGenerator sgen = (factory == null) ? new SourceGenerator()
231                                                  : new SourceGenerator(factory);
232 
233         // Everything below here sets options on our SourceGenerator
234 
235         sgen.setLineSeparator(getLineSeparator(options.getProperty(ARGUMENT_LINE_SEPARATOR)));
236         sgen.setDestDir(options.getProperty(ARGUMENT_DESTINATION_DIR));
237 
238         // set a resource destination if specified
239         String resourcesDestination = options.getProperty(ARGUMENT_RESOURCES_DESTINATION_DIR);
240         if (resourcesDestination != null) {
241             sgen.setResourceDestination(resourcesDestination);
242             System.out.print("-- ");
243             System.out.println(USING_SEPARATE_RESOURCES_DIRECTORY);
244         }
245         
246         sgen.setVerbose(options.getProperty(ARGUMENT_VERBOSE) != null);
247         sgen.setFailOnFirstError(options.getProperty(ARGUMENT_FAIL_ON_ERROR) != null);
248 
249         boolean force = (options.getProperty(ARGUMENT_FORCE) != null);
250         sgen.setSuppressNonFatalWarnings(force);
251         if (force) {
252             System.out.print("-- ");
253             System.out.println(SUPPRESS_NON_FATAL_WARN_MSG);
254         }
255 
256         if (options.getProperty(ARGUMENT_DISABLE_DESCRIPTORS) != null) {
257             sgen.setDescriptorCreation(false);
258             System.out.print("-- ");
259             System.out.println(DISABLE_DESCRIPTORS_MSG);
260         }
261 
262         String mappingFilename = options.getProperty(ARGUMENT_GENERATE_MAPPING);
263         if (mappingFilename != null) {
264             sgen.setGenerateMappingFile(true);
265             if (mappingFilename.length() > 0) {
266                 sgen.setMappingFilename(mappingFilename);
267             }
268             System.out.print("-- ");
269             System.out.println(GENERATING_MAPPING_FILE_MSG + "'" + mappingFilename + "'");
270         }
271 
272         if (options.getProperty(ARGUMENT_NOMARSHALL) != null) {
273             sgen.setCreateMarshalMethods(false);
274             System.out.print("-- ");
275             System.out.println(DISABLE_MARSHALL_MSG);
276         }
277 
278         if (options.getProperty(ARGUMENT_TESTABLE) != null) {
279             sgen.setTestable(true);
280             System.out.print("-- ");
281             System.out.println(CASTOR_TESTABLE_MSG);
282         }
283 
284         if (options.getProperty(ARGUMENT_SAX1) != null) {
285             sgen.setSAX1(true);
286             System.out.print("-- ");
287             System.out.println(SAX1_MSG);
288         }
289 
290         if (options.getProperty(ARGUMENT_CASE_INSENSITIVE) != null) {
291             sgen.setCaseInsensitive(true);
292             System.out.print("-- ");
293             System.out.println(CASE_INSENSITIVE_MSG);
294         }
295 
296         String nameConflictStrategy = options.getProperty(ARGUMENT_NAME_CONFLICT_STRATEGY);
297         if (nameConflictStrategy != null) {
298             sgen.setNameConflictStrategy(nameConflictStrategy);
299             System.out.print("-- ");
300             System.out.println(CASE_INSENSITIVE_MSG + nameConflictStrategy);
301         }
302 
303         String jClassPrinterType = options.getProperty(ARGUMENT_NAME_JCLASSPRINTER);
304         if (jClassPrinterType != null) {
305             sgen.setJClassPrinterType(jClassPrinterType);
306             System.out.print("-- ");
307             System.out.println(JCLASSPRINTER_TYPE_MSG + jClassPrinterType);
308         }
309         
310         String bindingFilename = options.getProperty(ARGUMENT_BINDING_FILENAME);
311         if (bindingFilename != null) {
312             try {
313                 sgen.setBinding(BindingLoader.createBinding(bindingFilename));
314             } catch (BindingException e) {
315                 System.out.print("--");
316                 System.out.println(BINDING_FILE_ERROR1_MSG + "'" + bindingFilename + "'"
317                                    + BINDING_FILE_ERROR2_MSG);
318                 e.printStackTrace();
319                 System.out.print("--");
320                 System.out.println(BINDING_FILE_ERROR3_MSG);
321             }
322         }
323 
324         if (options.getProperty(ARGUMENT_GENERATE_IMPORTED_SCHEMAS) != null) {
325             sgen.setGenerateImportedSchemas(true);
326             System.out.print("-- ");
327             System.out.println(GENERATE_IMPORT_MSG);
328         }
329 
330         try {
331             if (schemaFilename != null) {
332                 sgen.generateSource(schemaFilename, options.getProperty(ARGUMENT_PACKAGE));
333             } else if (schemaURL != null) {
334                 sgen.generateSource(new InputSource(schemaURL), options.getProperty(ARGUMENT_PACKAGE));
335             }
336         } catch (Exception ex) {
337             ex.printStackTrace();
338         }
339     } //-- main
340 
341     /**
342      * Creates and returns a <code>FieldInfoFactory</code> (or null if none
343      * requested or if an error is encountered making the requested type) to be
344      * used during source generation. If the <code>-types</code> argument is
345      * not found, check for the deprecated but still supported
346      * <code>-type-factory</code> argument. If we find that, give a
347      * deprecation warning.
348      * <p>
349      * Once we've parsed the command-line arguments, if there are no arguemnts
350      * appropriate for a type factory, then we have nothing to do. Otherwise,
351      * try to instantiate the requested <code>FieldInfoFactory</code>. If the
352      * <code>FieldInfoFactory</code> throws an
353      * <code>IllegalArgumentException</code> then try to instantiate the class
354      * provided, which allows someone to provide their own implementation of a
355      * <code>FieldInfoFactory</code>, which must extend (@link
356      * org.exolab.castor.builder.FieldInfoFactory).
357      *
358      * @param options the full set of command-line options
359      * @return a FieldInfoFactory to be used during source generation, or null
360      *         if the default should be used
361      * @see org.exolab.castor.builder.FieldInfoFactory
362      */
363     private static FieldInfoFactory getTypeFactory(final Properties options) {
364         String typeFactory = options.getProperty(ARGUMENT_TYPES);
365         if (typeFactory == null) {
366             // This backwards-compatible option is retained temporarily
367             typeFactory = options.getProperty(ARGUMENT_TYPES_DEPRECATED);
368             if (typeFactory != null) {
369                 System.out.print("-- ");
370                 System.out.println(TYPE_FACTORY_ARG_MSG);
371             }
372         }
373 
374         //-- For backwards compatibility
375         if (typeFactory != null && typeFactory.equals(ARGUMENT_TYPES_JAVA2)) {
376             typeFactory = "arraylist";
377         }
378 
379         // If no command-line arguments, then we have nothing to do
380         if (typeFactory == null) {
381             return null;
382         }
383 
384         FieldInfoFactory factory = null;
385         try {
386            System.out.print("-- ");
387            if (Boolean.valueOf(options.getProperty(ARGUMENT_USE_OLD_FIELD_NAMING, "true"))) {
388               System.out.println(USE_OLD_FIELD_NAMING_MSG);
389               factory = new FieldInfoFactory(typeFactory);
390            } else {
391               System.out.println(USE_NEW_FIELD_NAMING_MSG);
392               factory = new FieldInfoFactory(typeFactory, false);
393            }
394         } catch (IllegalArgumentException e) {
395             try {
396                 // Allow someone to provide their own FieldInfoFactory implementation
397                 ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
398                 factory = (FieldInfoFactory) classLoader.loadClass(typeFactory).newInstance();
399             } catch (Exception e2) {
400                 System.out.println("-- " + INVALID_TYPES_OPTION_MSG + typeFactory);
401                 System.out.println("-- " + e.getMessage());
402                 System.out.println("-- " + DEFAULT_FIELD_INFO_MSG);
403             }
404         }
405 
406         return factory;
407     }
408 
409     /**
410      * Parses the command-line argument for line separator style, handles bad
411      * values, and returns a value that the source generator will understand.
412      *
413      * @param lineSepStyle the command-line argument for line separation style
414      * @return the line separator string as the source generator understands it.
415      */
416     private static String getLineSeparator(final String lineSepStyle) {
417         String lineSep = System.getProperty("line.separator");
418         if (lineSepStyle != null) {
419             if (ARG_VALUE_LINE_SEPARATION_WIN.equals(lineSepStyle)) {
420                 System.out.println("-- " + LINE_SEPARATION_WIN_MSG);
421                 lineSep = "\r\n";
422             } else if (ARG_VALUE_LINE_SEPARATION_UNIX.equals(lineSepStyle)) {
423                 System.out.println("-- " + LINE_SEPARATION_UNIX_MSG);
424                 lineSep = "\n";
425             } else if (ARG_VALUE_LINE_SEPARATION_MAC.equals(lineSepStyle)) {
426                 System.out.println("-- " + LINE_SEPARATION_MAC_MSG);
427                 lineSep = "\r";
428             } else {
429                 System.out.println("-- " + INVALID_LINE_SEPARATOR_MSG + "'" + lineSepStyle + "'");
430                 System.out.println("-- " + DEFAULT_LINE_SEPARATOR_MSG);
431             }
432         }
433         return lineSep;
434     }
435 
436     /**
437      * Configures our command-line options object with the command line options
438      * that we recognize.
439      *
440      * @return a new CommandLineOptions object fully configured to parse our
441      *         command line.
442      */
443     private static CommandLineOptions setupCommandLineOptions() {
444         CommandLineOptions allOptions = new CommandLineOptions();
445         String desc;
446 
447         //-- filename flag
448         desc = "Sets the filename for the schema used as input.";
449         allOptions.addFlag(ARGUMENT_INPUT, "schema filename", desc);
450 
451         //-- filename flag
452         desc = "Sets the input source for the schema used as input.";
453         allOptions.addFlag(ARGUMENT_INPUT_SOURCE, "input source for XML schema", desc);
454 
455         //-- package name flag
456         desc = "Sets the package name for generated code.";
457         allOptions.addFlag(ARGUMENT_PACKAGE, "package name", desc, true);
458 
459         //-- destination directory
460         desc = "Sets the destination output directory.";
461         allOptions.addFlag(ARGUMENT_DESTINATION_DIR, "destination directory", desc, true);
462 
463         //-- resources destination directory
464         desc = "Sets the destination output directory for resources.";
465         allOptions.addFlag(ARGUMENT_RESOURCES_DESTINATION_DIR, "resources destination directory", desc, true);
466 
467         //-- line break flag
468         desc = "Sets the line separator style for the desired platform.";
469         allOptions.addFlag(ARGUMENT_LINE_SEPARATOR, "(unix | mac | win)", desc, true);
470 
471         //-- Force flag
472         desc = "Suppresses non fatal warnings, such as overwriting files.";
473         allOptions.addFlag(ARGUMENT_FORCE, "", desc, true);
474 
475         //-- Help flag
476         desc = "Displays this help screen.";
477         allOptions.addFlag(ARGUMENT_HELP, "", desc, true);
478 
479         //-- verbose flag
480         desc = "Prints out additional messages when creating source.";
481         allOptions.addFlag(ARGUMENT_VERBOSE, "", desc, true);
482 
483         //-- fail on first error flag
484         desc = "Causes source generation to fail on the first error encountered.";
485         allOptions.addFlag(ARGUMENT_FAIL_ON_ERROR, "", desc, true);
486 
487         //-- no descriptors flag
488         desc = "Disables the generation of the Class descriptors.";
489         allOptions.addFlag(ARGUMENT_DISABLE_DESCRIPTORS, "", desc, true);
490 
491         //-- mapping file flag
492         desc = "Indicates that a mapping file should be generated.";
493         allOptions.addFlag(ARGUMENT_GENERATE_MAPPING, "mapping filename", desc, true);
494 
495         //-- source generator types name flag
496         desc = "Sets the source generator types name (SGTypeFactory).";
497         allOptions.addFlag(ARGUMENT_TYPES, "types", desc, true);
498 
499         //-- We temporarily maintain backwards compatibility, but this argument is deprecated
500         desc = "";
501         allOptions.addFlag(ARGUMENT_TYPES_DEPRECATED, "collections class name", desc, true);
502 
503         //-- no marshaling framework methods
504         desc = "Disables the generation of the methods specific to the XML marshaling framework.";
505         allOptions.addFlag(ARGUMENT_NOMARSHALL, "", desc, true);
506 
507         //-- implements org.castor.xmlctf.CastorTestable?
508         desc = "Implements some specific methods to allow the generated classes"
509                 + " to be used with Castor Testing Framework.";
510         allOptions.addFlag(ARGUMENT_TESTABLE, "", desc, true);
511 
512         //-- use SAX1?
513         desc = "Uses SAX 1 in the generated code.";
514         allOptions.addFlag(ARGUMENT_SAX1, "", desc, true);
515 
516         //-- Source Generator Binding
517         desc = "Sets the Source Generator Binding File name.";
518         allOptions.addFlag(ARGUMENT_BINDING_FILENAME, "filename", desc, true);
519 
520         //-- Generates sources for imported XML Schemas
521         desc = "Generates sources for imported XML schemas.";
522         allOptions.addFlag(ARGUMENT_GENERATE_IMPORTED_SCHEMAS, "", desc, true);
523 
524         //-- Sets enumerated type to use a case insensitive lookup
525         desc = "Sets enumerated types to use a case insensitive lookup.";
526         allOptions.addFlag(ARGUMENT_CASE_INSENSITIVE, "", desc);
527 
528         //-- Sets enumerated type to use a case insensitive lookup
529         desc = "Sets name conflict strategy to use (possible values are " 
530             + "'informViaLog', 'warnViaConsoleDialog').";
531         allOptions.addFlag(ARGUMENT_NAME_CONFLICT_STRATEGY, "", desc);
532         
533         desc = "Selects the JClass printer type (default 'standard')";
534         allOptions.addFlag(ARGUMENT_NAME_JCLASSPRINTER, "<mode>", desc, true);
535 
536         desc = "Whether to use old Java field naming conventions (default to 'true')";
537         allOptions.addFlag(ARGUMENT_USE_OLD_FIELD_NAMING, "", desc, true);
538 
539         return allOptions;
540     }
541 
542 }