Class JsonbCreator


  • public class JsonbCreator
    extends java.lang.Object
    Object 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> 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.
      boolean contains​(java.lang.String paramName)
      True if param name is one of creator params.
      CreatorModel findByName​(java.lang.String paramName)
      Find creator parameter by name.
      CreatorModel[] getParams()
      Parameters of this creator.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 method
        on - 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.