Class Source
- java.lang.Object
-
- org.apache.logging.log4j.core.util.Source
-
public class Source extends java.lang.ObjectRepresents the source for the logging configuration.
-
-
Constructor Summary
Constructors Constructor Description Source(java.io.File file)Constructs a newSourcewith the specified file.Source(java.net.URI uri, long lastModified)Constructs a newSourcefrom 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 booleanequals(java.lang.Object o)java.io.FilegetFile()Returns the file configuration source, ornullif this configuration source is based on an URL or has neither a file nor an URL.java.lang.StringgetLocation()Returns a string describing the configuration source file or URL, ornullif this configuration source has neither a file nor an URL.java.net.URIgetURI()Returns the configuration source URL, ornullif this configuration source is based on a file or has neither a file nor an URL.inthashCode()java.lang.StringtoString()
-
-
-
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 newSourcewith the specified file. file.- Parameters:
file- the file where the input stream originated
-
Source
public Source(java.net.URI uri, long lastModified)Constructs a newSourcefrom 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, ornullif 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, ornullif 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, ornullif 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:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-