Package org.eclipse.lemminx.extensions.generators

## Class FileContentGeneratorManager

- java.lang.Object
- - org.eclipse.lemminx.extensions.generators.FileContentGeneratorManager

    public class FileContentGeneratorManager
    extends Object

Generic file generator.

By default the manager is able to generate :

- XML Schema from a given XML.
- DTD from a given XML.

### Constructor Summary

Constructors
`FileContentGeneratorManager​(IXMLFullFormatter formatter)`

### Method Summary

All Methods Instance Methods Concrete Methods
`<Source,​Settings extends FileContentGeneratorSettings> String` `generate​(Source document, SharedSettings sharedSettings, Settings generatorSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)` Generates a file content (ex : XSD, DTD) from the given document source `document` (ex: XML) by using the given settings `generatorSettings`.
`void` `registerGenerator​(IFileContentGenerator<?,​?> generator, Class<? extends FileContentGeneratorSettings> generatorKey)` Register the given generator by using settings class as key generator.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### FileContentGeneratorManager

    public FileContentGeneratorManager​(IXMLFullFormatter formatter)

### Method Detail

#### registerGenerator

    public void registerGenerator​(IFileContentGenerator<?,​?> generator,
                                  Class<? extends FileContentGeneratorSettings> generatorKey)

Register the given generator by using settings class as key generator.

Parameters:
  `generator` - the generator.
  `generatorKey` - the key of the generator identified by the settings class.

#### generate

    public <Source,​Settings extends FileContentGeneratorSettings> String generate​(Source document,
                                                                                        SharedSettings sharedSettings,
                                                                                        Settings generatorSettings,
                                                                                        org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

Generates a file content (ex : XSD, DTD) from the given document source `document` (ex: XML) by using the given settings `generatorSettings`.

Parameters:
  `document` - the document source (ex : XML).
  `sharedSettings` - the shared settings.
  `generatorSettings` - the generator settings.
  `formatter` - the formatter.
Returns:
  the result of the generation of the file content (ex : XSD, DTD) from the given document source `document` (ex: XML) by using the given settings `generatorSettings`.