T - The type of the parameter value.public abstract class FixedParam<T> extends MethodParam
| Modifier and Type | Field and Description |
|---|---|
protected T |
defaultValue |
protected T |
value |
expression, paramType| Modifier | Constructor and Description |
|---|---|
protected |
FixedParam(Class<T> paramType,
String expression,
Function<String,T> parser,
T defaultValue) |
protected |
FixedParam(Class<T> paramType,
T value,
T defaultValue) |
| Modifier and Type | Method and Description |
|---|---|
String |
buildCode(String indent) |
T |
getValue()
Gets the value associated to the parameter.
|
boolean |
isDefault()
Allows checking if a parameter is set to the default value.
|
buildStringLiteral, findConstantNames, findConstantNamesMap, getExpression, getImports, getMethodDefinitions, getStaticImports, getType, isIgnoredprotected FixedParam(Class<T> paramType, String expression, Function<String,T> parser, T defaultValue)
public boolean isDefault()
MethodParam
This is usually used in MethodCallBuilder instances to check if a parameter is set or
not to some custom value, and some method chaingin is required or not.
This method may, and is, overwritten by subclasses depending on the semantics of each type of parameter.
isDefault in class MethodParampublic T getValue()
public String buildCode(String indent)
buildCode in class MethodParamCopyright © 2023. All rights reserved.