|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fuin.units4j.dependency.Utils
public final class Utils
Utilities for the package.
| Method Summary | |
|---|---|
static com.thoughtworks.xstream.XStream |
createXStream()
Creates a ready configured XStream instance. |
static DependsOn |
findAllowedByName(List<DependsOn> allowed,
String pkgName)
Find a dependency in a list by a package name. |
static NotDependsOn |
findForbiddenByName(List<NotDependsOn> forbidden,
String pkgName)
Find a dependency in a list by a package name. |
static Dependencies |
load(Class<?> clasz,
String resourcePathAndName)
Load dependencies from a resource. |
static Dependencies |
load(File file)
Load dependencies from a file. |
static Dependencies |
load(InputStream inputStream)
Load dependencies from an input stream. |
static void |
save(File file,
Dependencies dependencies)
Write the dependencies to a file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static com.thoughtworks.xstream.XStream createXStream()
public static Dependencies load(File file)
file - XML File to load - Cannot be null and must be a
valid file.
public static Dependencies load(InputStream inputStream)
inputStream - XML input stream to read - Cannot be null.
public static Dependencies load(Class<?> clasz,
String resourcePathAndName)
clasz - Class to use for loading the resource - Cannot be
null.resourcePathAndName - Name and path of the XML file (in the class path) - Cannot be
null.
public static void save(File file,
Dependencies dependencies)
file - XML File - Cannot be null and must be a valid
file.dependencies - Dependencies to save.
public static DependsOn findAllowedByName(List<DependsOn> allowed,
String pkgName)
allowed - List to search.pkgName - Name of the package to find - Cannot be null.
null if nothing was found.
public static NotDependsOn findForbiddenByName(List<NotDependsOn> forbidden,
String pkgName)
forbidden - List to search.pkgName - Name of the package to find - Cannot be null.
null if nothing was found.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||