Package org.tomitribe.crest.contexts
Interface DefaultsContext
-
- All Known Implementing Classes:
EnvDefaultsContext,SystemPropertiesDefaultsContext
public interface DefaultsContextUsed to provide substitution values for @Default("hello ${value}") type expressions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Stringfind(Target target, java.lang.reflect.Method commandMethod, java.lang.String key)Implementations of DefaultsContext need to implement this method to convert an expression inside ${...} type substitutions to String values which will replace the substitution expression.
-
-
-
Method Detail
-
find
java.lang.String find(Target target, java.lang.reflect.Method commandMethod, java.lang.String key)
Implementations of DefaultsContext need to implement this method to convert an expression inside ${...} type substitutions to String values which will replace the substitution expression.- Parameters:
target- The command classcommandMethod- the command methodkey- the ... in the ${...} expression- Returns:
- the value to replace key with. Null is equivalent to the empty string.
-
-