public class ParameterModel extends AbstractModel
Modifier and Type | Class and Description |
---|---|
static class |
ParameterModel.Builder
A new Builder for creating ParameterModel instances.
|
Modifier | Constructor and Description |
---|---|
protected |
ParameterModel(ParameterModel.Builder builder)
Internal constructor.
|
Modifier and Type | Method and Description |
---|---|
static ParameterModel.Builder |
builder(String name)
Creates a new Builder instance.
|
Class<?> |
getParameterType()
Get the required parameter type.
|
ModelType |
getType()
Get the type of item that is modelled.
|
static ConfigModel |
of(String name)
Creates a new ConfigModel.
|
static ConfigModel |
of(String name,
boolean required)
Creates a new ConfigModel
|
static ConfigModel |
of(String name,
boolean required,
String expression)
Creates a new ConfigModel
|
String |
toString() |
Collection<ValidationResult> |
validate(org.apache.tamaya.Configuration config)
Validates the item and all its children against the given configuration.
|
compareTo, equals, getDescription, getName, getProvider, hashCode, isRequired
protected ParameterModel(ParameterModel.Builder builder)
builder
- the builder, not null.public ModelType getType()
ConfigModel
public Class<?> getParameterType()
public Collection<ValidationResult> validate(org.apache.tamaya.Configuration config)
ConfigModel
config
- the configuration to be validated against, not null.public static ParameterModel.Builder builder(String name)
name
- the fully qualified parameter name.public static ConfigModel of(String name, boolean required, String expression)
name
- the fully qualified parameter name.required
- the required flag.expression
- an optional regular expression to validate a value.public static ConfigModel of(String name, boolean required)
name
- the fully qualified parameter name.required
- the required flag.public static ConfigModel of(String name)
name
- the fully qualified parameter name.Copyright © 2014–2016 Apache Software Foundation. All rights reserved.