Package org.sosy_lab.common.io
Class PathTemplate
- java.lang.Object
-
- org.sosy_lab.common.io.PathTemplate
-
@Immutable public final class PathTemplate extends Object
A template for paths, from which a real path can be constructed by passing some values to fill in the blanks.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Path
getPath(Object... args)
Construct a concretePath
from this template and the given values.String
getTemplate()
Returns the raw template of this instance.static PathTemplate
ofFormatString(String pTemplate)
Create a new instance.String
toString()
-
-
-
Method Detail
-
ofFormatString
public static PathTemplate ofFormatString(String pTemplate)
Create a new instance.- Parameters:
pTemplate
- A non-null non-empty template String in the format forString.format(String, Object...)
.
-
getPath
public Path getPath(Object... args)
Construct a concretePath
from this template and the given values.- Throws:
IllegalFormatException
- If the template is invalid, or the arguments does not match the template.
-
getTemplate
public String getTemplate()
Returns the raw template of this instance.
-
-