View Javadoc
1   /**
2    *    Copyright 2006-2016 the original author or authors.
3    *
4    *    Licensed under the Apache License, Version 2.0 (the "License");
5    *    you may not use this file except in compliance with the License.
6    *    You may obtain a copy of the License at
7    *
8    *       http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *    Unless required by applicable law or agreed to in writing, software
11   *    distributed under the License is distributed on an "AS IS" BASIS,
12   *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *    See the License for the specific language governing permissions and
14   *    limitations under the License.
15   */
16  package org.mybatis.generator.api;
17  
18  import org.mybatis.generator.api.dom.xml.Document;
19  import org.mybatis.generator.config.Context;
20  
21  /**
22   * Objects implementing this interface are used to convert the internal 
23   * representation of the XML DOM classes into a string suitable for
24   * saving to the file system.  Note that the string generated by this
25   * class will be saved directly to the file system with no additional modifications.
26   * 
27   * Only one instance of the class will be created in each context.  Configuration can
28   * be passed into the class through the use of properties in the Context.
29   * 
30   * @author Jeff Butler
31   *
32   */
33  public interface XmlFormatter {
34      void setContext(Context context);
35      String getFormattedContent(Document document);
36  }