org.apache.ignite.compute.gridify.aop

## Class GridifyArgumentAdapter

- java.lang.Object
- - org.apache.ignite.compute.gridify.aop.GridifyArgumentAdapter

- All Implemented Interfaces:
    Serializable, GridifyArgument

      public class GridifyArgumentAdapter
      extends Object
      implements GridifyArgument

  Convenience adapter for `GridifyArgument` interface. This adapter should be used in custom grid job implementations.

  See `Gridify` documentation for more information about execution of `gridified` methods.

  See Also:
    `Gridify`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GridifyArgumentAdapter()` Empty constructor.
    `GridifyArgumentAdapter(Class<?> cls, String mtdName, Class<?>[] types, Object[] params, Object target)` Creates a fully initialized gridify argument.
    `GridifyArgumentAdapter(GridifyArgument orig, Object... newParams)` Copy constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Class<?>` | `getMethodClass()` Gets class to which the executed method belongs.
    `String` | `getMethodName()` Gets method name.
    `Object[]` | `getMethodParameters()` Gets method parameters in the same order they appear in method signature.
    `Class<?>[]` | `getMethodParameterTypes()` Gets method parameter types in the same order they appear in method signature.
    `Object` | `getTarget()` Gets target object for method execution.
    `void` | `setMethodClass(Class<?> cls)` Sets method class.
    `void` | `setMethodName(String mtdName)` Sets method name.
    `void` | `setMethodParameters(Object... params)` Sets method parameters.
    `void` | `setMethodParameterTypes(Class<?>... types)` Sets method parameter types.
    `void` | `setTarget(Object target)` Sets target object for method execution.
    `String` | `toString()`
    `void` | `updateMethodParameter(Object param, int index)` Updates method parameter.
    `void` | `updateMethodParameterType(Class<?> type, int index)` Updates parameter type.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### GridifyArgumentAdapter

          public GridifyArgumentAdapter()

      Empty constructor.

    - #### GridifyArgumentAdapter

          public GridifyArgumentAdapter(GridifyArgument orig,
                                        Object... newParams)

      Copy constructor.
      Parameters:
        `orig` - Copy to create this instance from.
        `newParams` - Optional array of new parameters to override the ondes from `orig`.

    - #### GridifyArgumentAdapter

          public GridifyArgumentAdapter(Class<?> cls,
                                        String mtdName,
                                        Class<?>[] types,
                                        Object[] params,
                                        Object target)

      Creates a fully initialized gridify argument.
      Parameters:
        `cls` - Method class.
        `mtdName` - Method name.
        `types` - Method parameter types.
        `params` - Method parameters.
        `target` - Target object.

  - ### Method Detail

    - #### getMethodClass

          public Class<?> getMethodClass()

      Gets class to which the executed method belongs.
      Specified by:
        `getMethodClass` in interface `GridifyArgument`
      Returns:
        Class to which method belongs.

    - #### getMethodName

          public String getMethodName()

      Gets method name.
      Specified by:
        `getMethodName` in interface `GridifyArgument`
      Returns:
        Method name.

    - #### getMethodParameterTypes

          public Class<?>[] getMethodParameterTypes()

      Gets method parameter types in the same order they appear in method signature.
      Specified by:
        `getMethodParameterTypes` in interface `GridifyArgument`
      Returns:
        Method parameter types.

    - #### getMethodParameters

          public Object[] getMethodParameters()

      Gets method parameters in the same order they appear in method signature.
      Specified by:
        `getMethodParameters` in interface `GridifyArgument`
      Returns:
        Method parameters.

    - #### setMethodClass

          public void setMethodClass(Class<?> cls)

      Sets method class.
      Parameters:
        `cls` - Method class.

    - #### setMethodName

          public void setMethodName(String mtdName)

      Sets method name.
      Parameters:
        `mtdName` - Method name.

    - #### setMethodParameterTypes

          public void setMethodParameterTypes(Class<?>... types)

      Sets method parameter types.
      Parameters:
        `types` - Method parameter types.

    - #### updateMethodParameterType

          public void updateMethodParameterType(Class<?> type,
                                                int index)

      Updates parameter type.
      Parameters:
        `type` - Parameter type to set.
        `index` - Index of the parameter.

    - #### setMethodParameters

          public void setMethodParameters(Object... params)

      Sets method parameters.
      Parameters:
        `params` - Method parameters.

    - #### updateMethodParameter

          public void updateMethodParameter(Object param,
                                            int index)

      Updates method parameter.
      Parameters:
        `param` - Method parameter value to set.
        `index` - Parameter's index.

    - #### setTarget

          public void setTarget(Object target)

      Sets target object for method execution.
      Parameters:
        `target` - Target object for method execution.

    - #### getTarget

          public Object getTarget()

      Gets target object for method execution.
      Specified by:
        `getTarget` in interface `GridifyArgument`
      Returns:
        Target object for method execution.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.13.0
Release Date | : April 20 2022