Package com.typesafe.config
Class ConfigOriginFactory
- java.lang.Object
-
- com.typesafe.config.ConfigOriginFactory
-
public final class ConfigOriginFactory extends java.lang.Object
This class contains some static factory methods for building aConfigOrigin
.ConfigOrigin
s are automatically created when you call other API methods to get aConfigValue
orConfig
. But you can also set the origin of an existingConfigValue
, usingConfigValue.withOrigin(ConfigOrigin)
.- Since:
- 1.3.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConfigOrigin
newFile(java.lang.String filename)
Creates a file origin with the given filename.static ConfigOrigin
newSimple()
Returns the default origin for values when no other information is provided.static ConfigOrigin
newSimple(java.lang.String description)
Returns an origin with the given description.static ConfigOrigin
newURL(java.net.URL url)
Creates a url origin with the given URL object.
-
-
-
Method Detail
-
newSimple
public static ConfigOrigin newSimple()
Returns the default origin for values when no other information is provided. This is the origin used in#fromAnyRef(Object)
.- Returns:
- the default origin
- Since:
- 1.3.0
-
newSimple
public static ConfigOrigin newSimple(java.lang.String description)
Returns an origin with the given description.- Parameters:
description
- brief description of what the origin is- Returns:
- a new origin
- Since:
- 1.3.0
-
newFile
public static ConfigOrigin newFile(java.lang.String filename)
Creates a file origin with the given filename.- Parameters:
filename
- the filename of this origin- Returns:
- a new origin
- Since:
- 1.3.0
-
newURL
public static ConfigOrigin newURL(java.net.URL url)
Creates a url origin with the given URL object.- Parameters:
url
- the url of this origin- Returns:
- a new origin
- Since:
- 1.3.0
-
-