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