public final class XmlConstraintLoader
extends java.lang.Object
XmlConstraintLoader
class provides functionality that loads a constraint from
the specified XML file.Modifier and Type | Method and Description |
---|---|
static Constraint |
loadFromFile(java.lang.String fileName)
Loads a constraint from the specified XML file.
|
static Constraint |
loadFromString(java.lang.String text)
Creates a constraint from the specified XML string.
|
static Constraint |
loadFromUrl(java.net.URL url)
Loads a constraint from an XML file pointed by the specified URL.
|
public static Constraint loadFromFile(java.lang.String fileName) throws XmlNotLoadedException
fileName
- The full name of an XML file storing the constraint.java.lang.IllegalArgumentException
- if the parameter equals null.XmlNotLoadedException
- if an issue occurred during parsing the XML document.public static Constraint loadFromString(java.lang.String text) throws XmlNotLoadedException
text
- XML text describing a constraint.java.lang.IllegalArgumentException
- if the parameter equals null.XmlNotLoadedException
- if an issue occurred during parsing the XML text.public static Constraint loadFromUrl(java.net.URL url) throws XmlNotLoadedException
url
- URL that points to an XML file storing the constraint.java.lang.IllegalArgumentException
- if the parameter equals null.XmlNotLoadedException
- if an issue occurred during parsing the XML document.