Package org.jboss.jca.codegenerator
Class Utils
java.lang.Object
org.jboss.jca.codegenerator.Utils
A Utils.
- Version:
- $Revision: $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopyFolder(String sourcePath, String targetPath, String filterName) copy foldersstatic FileWritercreateFile(String name, String outDir) Create filestatic FileWritercreateSrcFile(String name, String packageName, String outDir) Create source filestatic FileWritercreateTestFile(String name, String packageName, String outDir) Create test filestatic StringreadFileIntoString(URL input) Reads the contents of a file into a string variable.static voidRecursive delete
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
readFileIntoString
Reads the contents of a file into a string variable.- Parameters:
input- url- Returns:
- string of return
- Throws:
IOException- ioException
-
createSrcFile
public static FileWriter createSrcFile(String name, String packageName, String outDir) throws IOException Create source file- Parameters:
name- The name of the classpackageName- The package nameoutDir- output directory- Returns:
- The file
- Throws:
IOException- Thrown if an error occurs
-
createTestFile
public static FileWriter createTestFile(String name, String packageName, String outDir) throws IOException Create test file- Parameters:
name- The name of the classpackageName- The package nameoutDir- output directory- Returns:
- The file
- Throws:
IOException- Thrown if an error occurs
-
createFile
Create file- Parameters:
name- The name of the classoutDir- output directory- Returns:
- The file
- Throws:
IOException- Thrown if an error occurs
-
recursiveDelete
Recursive delete- Parameters:
f- The file handler- Throws:
IOException- Thrown if a file could not be deleted
-
copyFolder
public static void copyFolder(String sourcePath, String targetPath, String filterName) throws IOException copy folders- Parameters:
sourcePath- source foldertargetPath- target folderfilterName- filter name- Throws:
IOException- Thrown if an error occurs
-