|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectit.avutils.jmapper.util.FilesManager
public class FilesManager
FilesManager provides all the operations that allow the manipulation of files.
| Constructor Summary | |
|---|---|
FilesManager()
|
|
| Method Summary | |
|---|---|
static void |
addConfigurationToClass(String path,
List<Attribute> attributes,
Class<?> aClass)
This method adds the configurations present in the xml file in the Class. |
static List<Class<?>> |
annotatedClasses()
Returns a list with all annotated classes |
static List<File> |
annotatedFiles()
Returns a list with all annotated files. |
static List<String> |
classesPath()
Returns a list with the paths of all java classes. |
static void |
cleanClass(File file,
Class<?> aClass,
boolean cleanAll)
This method rewrite the file without JMap annotations. |
static String |
fullPathOf(String fileName)
Starting from filename returns its path. |
static boolean |
isFileAnnotated(String path,
Class<?> aClass)
Returns true if the file, relative to path, containts the @JMap annotation. |
static XmlJmapper |
readAtDevelopmentTime(String xmlPath)
This method loads the xml file relative to xmlPath parameter. |
static XmlJmapper |
readAtRuntime(String xmlPath)
This method loads the xml file relative to xmlPath parameter. |
static File |
searchFile(String name)
Returns the file that has the name given as input, null otherwise. |
static boolean |
verifyFileExistence(String path)
Method used to check the file existence, for test purpose. |
static void |
write(XmlJmapper jmapper,
String xmlPath)
This method writes the xml file starting from an XmlJmapper object, following the xmlPath. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FilesManager()
| Method Detail |
|---|
public static void addConfigurationToClass(String path,
List<Attribute> attributes,
Class<?> aClass)
throws NoSuchFieldException,
IOException
path - path of the file that represents the classattributes - attributes of this ClassaClass - class to rewrite
NoSuchFieldException
IOException
public static void cleanClass(File file,
Class<?> aClass,
boolean cleanAll)
throws IOException
file - file to rewriteaClass - Class that represent the filecleanAll - true if all annotation should be delete, false otherwise
IOExceptionpublic static boolean verifyFileExistence(String path)
path - Path of the file to checkpublic static File searchFile(String name)
name - file name
public static List<String> classesPath()
throws FileNotFoundException,
LoadingFileException
FileNotFoundException
LoadingFileException
public static List<File> annotatedFiles()
throws FileNotFoundException,
LoadingFileException,
IOException
FileNotFoundException
LoadingFileException
IOException
public static List<Class<?>> annotatedClasses()
throws LoadingFileException,
IOException,
ClassNotFoundException
LoadingFileException
IOException
ClassNotFoundException
public static boolean isFileAnnotated(String path,
Class<?> aClass)
throws IOException
path - file path
IOException
public static void write(XmlJmapper jmapper,
String xmlPath)
throws IOException
jmapper - XmlJmapper object that will be used for write the xml mapping file
IOException
public static XmlJmapper readAtDevelopmentTime(String xmlPath)
throws FileNotFoundException
xmlPath - path to xml file
FileNotFoundException
public static XmlJmapper readAtRuntime(String xmlPath)
throws MalformedURLException,
IOException
xmlPath - path to xml file
IOException
MalformedURLExceptionpublic static String fullPathOf(String fileName)
fileName - file name
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||