Package org.appng.api.support
Class ParameterSupportBase
- java.lang.Object
-
- org.appng.api.support.ParameterSupportBase
-
- All Implemented Interfaces:
ParameterSupport
- Direct Known Subclasses:
DollarParameterSupport
,HashParameterSupport
public class ParameterSupportBase extends Object implements ParameterSupport
BasicParameterSupport
implementation.- Author:
- Matthias Müller
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ParameterSupportBase(String prefix, String suffix)
protected
ParameterSupportBase(String prefix, String suffix, Map<String,String> parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
allowDotInName()
Call this method to allow dots in parameter names, which is disabled by default.ExpressionEvaluator
getExpressionEvaluator()
Returns anExpressionEvaluator
created with the parameters of thisParameterSupport
.Collection<String>
getParameterNames()
Returns the names of all parameters thisParameterSupport
is aware of.Map<String,String>
getParameters()
Returns an immutableMap
containing all parameters thisParameterSupport
is aware of.List<String>
getParameters(String source)
Returns the names of all parameters used in the givenString
, without affixes.String
replaceParameters(String source)
Replaces all parameters in the givenString
and returns a new one containing the replacements.
-
-
-
Method Detail
-
allowDotInName
public void allowDotInName()
Call this method to allow dots in parameter names, which is disabled by default.
-
replaceParameters
public final String replaceParameters(String source)
Description copied from interface:ParameterSupport
Replaces all parameters in the givenString
and returns a new one containing the replacements.- Specified by:
replaceParameters
in interfaceParameterSupport
- Parameters:
source
- theString
to replace the parameters in- Returns:
- a new
String
with the parameters replaced
-
getParameters
public final List<String> getParameters(String source)
Description copied from interface:ParameterSupport
Returns the names of all parameters used in the givenString
, without affixes.- Specified by:
getParameters
in interfaceParameterSupport
- Parameters:
source
- theString
to search the parameters for- Returns:
- the names of all parameters used in the given
String
, without affixes.
-
getParameterNames
public final Collection<String> getParameterNames()
Description copied from interface:ParameterSupport
Returns the names of all parameters thisParameterSupport
is aware of.- Specified by:
getParameterNames
in interfaceParameterSupport
- Returns:
- the names of all parameters this
ParameterSupport
is aware of
-
getParameters
public final Map<String,String> getParameters()
Description copied from interface:ParameterSupport
Returns an immutableMap
containing all parameters thisParameterSupport
is aware of.- Specified by:
getParameters
in interfaceParameterSupport
- Returns:
- an immutable
Map
containing all parameters thisParameterSupport
is aware of.
-
getExpressionEvaluator
public final ExpressionEvaluator getExpressionEvaluator()
Description copied from interface:ParameterSupport
Returns anExpressionEvaluator
created with the parameters of thisParameterSupport
.- Specified by:
getExpressionEvaluator
in interfaceParameterSupport
- Returns:
- an
ExpressionEvaluator
created with the parameters of thisParameterSupport
.
-
-