Class Source
- java.lang.Object
-
- org.apache.logging.log4j.core.util.Source
-
public class Source extends Object
Represents the source for the logging configuration.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
File
getFile()
Returns the file configuration source, ornull
if this configuration source is based on an URL or has neither a file nor an URL.String
getLocation()
Returns a string describing the configuration source file or URL, ornull
if this configuration source has neither a file nor an URL.URI
getURI()
Returns the configuration source URL, ornull
if this configuration source is based on a file or has neither a file nor an URL.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
Source
public Source(ConfigurationSource source)
Constructs a Source from a ConfigurationSource.- Parameters:
source
- The ConfigurationSource.
-
Source
public Source(File file)
Constructs a newSource
with the specified file. file.- Parameters:
file
- the file where the input stream originated
-
Source
public Source(URI uri, long lastModified)
Constructs a newSource
from the specified URI.- Parameters:
uri
- the URL where the input stream originated
-
-
Method Detail
-
getFile
public File getFile()
Returns the file configuration source, ornull
if this configuration source is based on an URL or has neither a file nor an URL.- Returns:
- the configuration source file, or
null
-
getURI
public URI getURI()
Returns the configuration source URL, ornull
if this configuration source is based on a file or has neither a file nor an URL.- Returns:
- the configuration source URL, or
null
-
getLocation
public String getLocation()
Returns a string describing the configuration source file or URL, ornull
if this configuration source has neither a file nor an URL.- Returns:
- a string describing the configuration source file or URL, or
null
-
-