public class Source
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.io.File |
file
Captures a URI or File.
|
private java.lang.String |
location |
private java.net.URI |
uri |
Constructor and Description |
---|
Source(ConfigurationSource source)
Constructs a Source from a ConfigurationSource.
|
Source(java.io.File file)
Constructs a new
Source with the specified file. |
Source(java.net.URI uri,
long lastModified)
Constructs a new
Source from the specified URI. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.io.File |
getFile()
Returns the file configuration source, or
null if this configuration source is based on an URL or has
neither a file nor an URL. |
java.lang.String |
getLocation()
Returns a string describing the configuration source file or URL, or
null if this configuration source
has neither a file nor an URL. |
java.net.URI |
getURI()
Returns the configuration source URL, or
null if this configuration source is based on a file or has
neither a file nor an URL. |
int |
hashCode() |
java.lang.String |
toString() |
private final java.io.File file
private final java.net.URI uri
private final java.lang.String location
public Source(ConfigurationSource source)
source
- The ConfigurationSource.public Source(java.io.File file)
Source
with the specified file.
file.file
- the file where the input stream originatedpublic Source(java.net.URI uri, long lastModified)
Source
from the specified URI.uri
- the URL where the input stream originatedpublic java.io.File getFile()
null
if this configuration source is based on an URL or has
neither a file nor an URL.null
public java.net.URI getURI()
null
if this configuration source is based on a file or has
neither a file nor an URL.null
public java.lang.String getLocation()
null
if this configuration source
has neither a file nor an URL.null
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object