Module com.github.rvesse.airline
Class AbstractPlaceholderLocator
- java.lang.Object
-
- com.github.rvesse.airline.parser.resources.FileLocator
-
- com.github.rvesse.airline.parser.resources.AbstractPlaceholderLocator
-
- All Implemented Interfaces:
ResourceLocator
- Direct Known Subclasses:
EnvVarLocator
,JvmSystemPropertyLocator
public abstract class AbstractPlaceholderLocator extends FileLocator
A resource locator that supports placeholders of the form${name}
which when found calls theresolvePlaceholder(String)
method to try and resolve the encountered placeholders. If the placeholder is not resolved then the string is left as-is.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
PLACEHOLDER_END
private static java.lang.String
PLACEHOLDER_START
-
Fields inherited from class com.github.rvesse.airline.parser.resources.FileLocator
FILE_URI_PREFIX
-
-
Constructor Summary
Constructors Constructor Description AbstractPlaceholderLocator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
resolve(java.lang.String searchLocation)
Resolves the search locationprotected abstract java.lang.String
resolvePlaceholder(java.lang.String name)
Resolves a placeholder-
Methods inherited from class com.github.rvesse.airline.parser.resources.FileLocator
open
-
-
-
-
Field Detail
-
PLACEHOLDER_START
private static final java.lang.String PLACEHOLDER_START
- See Also:
- Constant Field Values
-
PLACEHOLDER_END
private static final java.lang.String PLACEHOLDER_END
- See Also:
- Constant Field Values
-
-
Method Detail
-
resolve
protected java.lang.String resolve(java.lang.String searchLocation)
Description copied from class:FileLocator
Resolves the search location- Overrides:
resolve
in classFileLocator
- Parameters:
searchLocation
- Search location- Returns:
- Resolved location
-
resolvePlaceholder
protected abstract java.lang.String resolvePlaceholder(java.lang.String name)
Resolves a placeholder- Parameters:
name
- Placeholder name- Returns:
- Resolved placeholder
-
-