Class DotenvVar
java.lang.Object
org.apache.juneau.commons.svl.Var
org.apache.juneau.commons.svl.SimpleVar
org.apache.juneau.commons.svl.DefaultingVar
org.apache.juneau.commons.svl.vars.DotenvVar
Dotenv file variable resolver.
The format for this var is
Values are resolved from DotenvPropertySource using either:
- The default dotenv path resolution when using the no-arg constructor.
- The path provided via
create(Path).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanValues from this source are never re-resolved: a value containing${...} is returned literally.static DotenvVarCreates aDotenvVarbound to a specific dotenv file path.resolve(VarResolverSession session, String key) The interface that needs to be implemented for subclasses ofSimpleVar.Methods inherited from class org.apache.juneau.commons.svl.DefaultingVar
doResolveMethods inherited from class org.apache.juneau.commons.svl.Var
allowNested, canResolve, getName, isStable, resolveValue
-
Field Details
-
NAME
The name of this variable.- See Also:
-
-
Constructor Details
-
DotenvVar
public DotenvVar()Constructor.
-
-
Method Details
-
create
Creates aDotenvVarbound to a specific dotenv file path.- Parameters:
path- The dotenv file path. Can benull , in which case no properties are loaded.- Returns:
- A new
DotenvVarinstance.
-
allowRecurse
Values from this source are never re-resolved: a value containing${...} is returned literally.- Overrides:
allowRecursein classVar- Returns:
- Always
false .
-
resolve
Description copied from class:VarThe interface that needs to be implemented for subclasses ofSimpleVar.
-