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.ConfigOrigins are automatically created when you call other API methods to get aConfigValueorConfig. 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 ConfigOriginnewFile(java.lang.String filename)Creates a file origin with the given filename.static ConfigOriginnewSimple()Returns the default origin for values when no other information is provided.static ConfigOriginnewSimple(java.lang.String description)Returns an origin with the given description.static ConfigOriginnewURL(java.net.URL url)Creates a url origin with the given URL object.
-
-
-
Method Detail
-
newSimple
public static 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 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 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 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
-
-