<s> package org . eclipse . jdt . core . jdom ; import org . eclipse . jdt . internal . core . jdom . * ; public class DOMFactory implements IDOMFactory { String lineSeparator ; public DOMFactory ( ) { this . lineSeparator = org . eclipse . jdt . internal . core . util . Util . getLineSeparator ( null , null ) ; } public IDOMCompilationUnit createCompilationUnit ( ) { return ( new DOMBuilder ( ) ) . createCompilationUnit ( ) ; } public IDOMCompilationUnit createCompilationUnit ( char [ ] sourceCode , String name ) { if ( sourceCode == null ) { return null ; } return ( new SimpleDOMBuilder ( ) ) . createCompilationUnit ( sourceCode , name . toCharArray ( ) ) ; } public IDOMCompilationUnit createCompilationUnit ( String sourceCode , String name ) { if ( sourceCode == null ) { return null ; } return ( new SimpleDOMBuilder ( ) ) . createCompilationUnit ( sourceCode . toCharArray ( ) , name . toCharArray ( ) ) ; } public IDOMField createField ( ) { return createField ( "" + this . lineSeparator ) ; } public IDOMField createField ( String sourceCode ) { if ( sourceCode == null ) { return null ; } return ( new DOMBuilder ( ) ) . createField ( sourceCode . toCharArray ( ) ) ; } public IDOMImport createImport ( ) { return ( new DOMBuilder ( ) ) . createImport ( ) ; } public IDOMImport createImport ( String sourceCode ) { if ( sourceCode == null ) { return null ; } return ( new DOMBuilder ( ) ) . createImport ( sourceCode . toCharArray ( ) ) ; } public IDOMInitializer createInitializer ( ) { return createInitializer ( "static {}" + this . lineSeparator ) ; } public IDOMInitializer createInitializer ( String sourceCode ) { if ( sourceCode == null ) { return null ; } return ( new DOMBuilder ( ) ) . createInitializer ( sourceCode . toCharArray ( ) ) ; } public IDOMMethod createMethod ( ) { return createMethod ( "" + this . lineSeparator + "}" + this . lineSeparator ) ; } public IDOMMethod createMethod ( String sourceCode ) { if ( sourceCode == null ) { return null ; } return ( new DOMBuilder ( ) ) . createMethod ( sourceCode . toCharArray ( ) ) ; } public IDOMPackage createPackage ( ) { return ( new DOMBuilder ( ) ) . createPackage ( ) ; } public IDOMPackage createPackage ( String sourceCode ) { if ( sourceCode == null ) { return null ; } return ( new DOMBuilder ( ) ) . createPackage ( sourceCode . toCharArray ( ) ) ; } public IDOMType createType ( ) { return createType ( "" + this . lineSeparator + "}" + this . lineSeparator ) ; } public IDOMType createClass ( ) { return createType ( "" + this . lineSeparator + "}" + this . lineSeparator ) ; } public IDOMType createInterface ( ) { return createType ( "" + this . lineSeparator + "}" + this . lineSeparator ) ; } public IDOMType createType ( String sourceCode ) { if ( sourceCode == null ) { return null ; } return ( new DOMBuilder ( ) ) . createType ( sourceCode . toCharArray ( ) ) ; } } </s>