Class JsonbCreator
- java.lang.Object
-
- org.eclipse.yasson.internal.model.JsonbCreator
-
public class JsonbCreator extends java.lang.ObjectObject holding reference to Constructor / Method for custom object creation.
-
-
Constructor Summary
Constructors Constructor Description JsonbCreator(java.lang.reflect.Executable executable, CreatorModel[] creatorModels)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tcall(java.lang.Object[] params, java.lang.Class<T> on)Create instance by either constructor or factory method, with provided parameter values and a Class to call on.booleancontains(java.lang.String paramName)True if param name is one of creator params.CreatorModelfindByName(java.lang.String paramName)Find creator parameter by name.CreatorModel[]getParams()Parameters of this creator.
-
-
-
Constructor Detail
-
JsonbCreator
public JsonbCreator(java.lang.reflect.Executable executable, CreatorModel[] creatorModels)Creates a new instance.- Parameters:
executable- Executable.creatorModels- Parameters.
-
-
Method Detail
-
call
public <T> T call(java.lang.Object[] params, java.lang.Class<T> on)Create instance by either constructor or factory method, with provided parameter values and a Class to call on.- Type Parameters:
T- Type of class / instance- Parameters:
params- parameters to be passed into constructor / factory methodon- class to call onto- Returns:
- instance
-
contains
public boolean contains(java.lang.String paramName)
True if param name is one of creator params.- Parameters:
paramName- Param name to check.- Returns:
- True if found.
-
findByName
public CreatorModel findByName(java.lang.String paramName)
Find creator parameter by name.- Parameters:
paramName- parameter name as it appear in json document.- Returns:
- Creator parameter.
-
getParams
public CreatorModel[] getParams()
Parameters of this creator.- Returns:
- Parameters.
-
-