T
- Type of the created instance@Beta @PublicAPI public class CreatorWrapper<T> extends Object
A creator method simply creates an instance of a type from an instance of a parameter type. (Consider here the Descriptors API createXXXComparator methods.) When the parameter type has free parameters it should be implemented as an immutable parameter object - builder class pair. This wrapper usually wraps a default instance of such immutable parameter objects; however it returns an associated builder to change.
Please note that this class is marked with Beta
annotation, so it can be subject of incompatible changes
or removal in later releases.
Modifier and Type | Method and Description |
---|---|
T |
create()
Invoke creator method.
|
Object |
getBuilderOrParameterObject()
Get the parameter object or its mutable builder if exists.
|
String |
getDescription() |
String |
getName() |
String |
getShortName() |
public Object getBuilderOrParameterObject()
If the returned object is mutable then its state will be considered upon creation
public String getShortName()
public String getName()
public String getDescription()
public T create()
Use builder if exists, otherwise initial