public interface Creator extends HasPath
Persistable.| Modifier and Type | Interface and Description |
|---|---|
static class |
Creator.Descriptor
JavaBean that describes an invocation of a
Creator. |
| Modifier and Type | Method and Description |
|---|---|
static Object |
decode(String encodedValue,
Type valueType)
Converts a string representation of a parameter value to the actual value.
|
static String |
encode(Object value,
Type valueType)
Converts a parameter value to its string representation.
|
String |
getCategory()
Returns the category this factory belongs to.
|
String |
getDescription()
The description of this factory.
|
String |
getName()
The name of this factory.
|
String[] |
getParameterDescriptions()
The list of the names of the parameters of this factory.
|
Parameter[] |
getParameters()
The list of parameters of this factory.
|
String |
getPath()
Returns the slash-separated path to this factory.
|
Persistable |
make(Object... parameters)
Creates an instance of a
Persistable. |
Persistable |
make(String... parametersAsStrings)
Creates an instance of a
Persistable. |
String getCategory()
Persistable.String getPath()
Persistable.
The path must be unique among factories in the same category.String getName()
String getDescription()
Parameter[] getParameters()
String[] getParameterDescriptions()
Persistable make(Object... parameters) throws Exception
Persistable.
Implementations must ensure that the created instance has correct creator properties set on its descriptor.parameters - Creator parameters to be used.Exception - If the instance cannot be created. The exception should indicate the reason for the failure.Persistable make(String... parametersAsStrings) throws Exception
Persistable.
Implementations must ensure that the created instance has correct factory properties set on its descriptor.parametersAsStrings - String representations of the factory parameters to be used.Exception - If the instance cannot be created. The exception should indicate the reason for the failure.static String encode(Object value, Type valueType)
value - Parameter value.valueType - Parameter type.IllegalArgumentException - If the provided arguments are incompatible.static Object decode(String encodedValue, Type valueType)
encodedValue - String representation of a parameter value.valueType - Parameter type.IllegalArgumentException - If the provided string cannot be converted to an object of the specified type.Copyright © 2023 LSST. All rights reserved.