com.tibco.n2.service.adapter.dynamic

## Class AbstractAdapterHandler

- java.lang.Object
- - com.tibco.n2.service.adapter.dynamic.AbstractAdapterHandler

- All Implemented Interfaces:
    java.lang.reflect.InvocationHandler
  Direct Known Subclasses:
    AdapterCoreObjectHandler, AdapterObjectHandler, DynamicAdapterHandler

      public abstract class AbstractAdapterHandler
      extends java.lang.Object
      implements java.lang.reflect.InvocationHandler

  TODO Give a useful description of the type.
  Since:
    TODO

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AdapterExceptionHandler` | `handler`
    `protected boolean` | `isBindingMethod`
    `protected Processor` | `serviceAdapter`
    `protected java.lang.Object` | `subjectService`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractAdapterHandler(Processor serviceAdapter, java.lang.Object subjectService)` TODO Describe this method

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.lang.Object[]` | `adaptArguments(java.lang.reflect.Method subjectMethod, java.lang.Object[] args)` TODO Describe this method
    `protected java.lang.Object` | `adaptReturnType(java.lang.Object object, java.lang.reflect.Method method)` TODO Describe this method
    `protected java.lang.reflect.Method` | `considerMethodAnnotations(java.lang.reflect.Method method, java.lang.Object[] args)` TODO Describe this method
    `protected java.lang.reflect.Method` | `getAdaptedMethod(java.lang.reflect.Method method)` TODO Describe this method
    `protected java.lang.reflect.Field[]` | `getAllFields(java.lang.Object object)` TODO Describe this method
    `protected java.lang.Class[]` | `getAllInterfaces(java.lang.Object object)` TODO Describe this method
    `protected static AuditActions` | `getAuditAction(java.lang.reflect.Method method)` TODO Describe this method
    `protected java.lang.Class` | `getComponentType()` TODO Describe this method
    `protected java.lang.reflect.Method` | `getDeclaredMatchingMethod(java.lang.Class[] interfaces, java.lang.reflect.Method method)` TODO Describe this method
    `protected java.lang.reflect.Method` | `getDeclaredMatchingMethod(java.lang.Class clazz, java.lang.reflect.Method method)` TODO Describe this method
    `protected java.lang.reflect.Method` | `getDeclaredMatchingMethod(java.lang.Object object, java.lang.reflect.Method method)` TODO Describe this method
    `protected java.lang.Object` | `getFieldValue(java.lang.Object object, java.lang.String fieldName)` TODO Describe this method
    `protected java.lang.Class` | `getInterface(java.lang.Object object, java.lang.String interfaceName)` TODO Describe this method
    `protected java.util.Iterator` | `getIterator(java.lang.Object object, java.lang.reflect.Method method)`
    `protected java.lang.reflect.Method` | `getMatchingMethod(java.lang.Object object, java.lang.reflect.Method method)` Deprecated.
    `protected java.lang.reflect.Method` | `getMatchingMethod(java.lang.Object object, java.lang.String methodName)` Deprecated.
    `protected java.lang.Class` | `getReturnParameterizedType(java.lang.reflect.Method method)`
    `protected java.lang.String` | `getterMethod(java.lang.String fieldName)` TODO Describe this method
    `protected java.lang.Object` | `handleArray(java.lang.Object object, java.lang.reflect.Method method)` TODO Describe this method
    `protected java.lang.Object` | `handleCollection(java.lang.Object object, java.lang.reflect.Method method)` TODO Describe this method
    `protected abstract java.lang.Object` | `handleServiceInvocation(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)` TODO Describe this method
    `protected java.lang.Object` | `hookBeforeInvocation(java.lang.Object object, java.lang.reflect.Method method, java.lang.Object[] args)` TODO Describe this method
    `java.lang.Object` | `invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)`
    `protected java.lang.Object` | `invokeMethod(java.lang.Object obj, java.lang.reflect.Method method, java.lang.Object[] args)` TODO Describe this method
    `protected java.lang.Object` | `invokeMethod(java.lang.Object obj, java.lang.reflect.Method method, java.lang.Object[] args, boolean isMatching)` TODO Describe this method
    `protected java.lang.Object` | `invokeMethodOnServiceAdapter(java.lang.reflect.Method method, java.lang.Object[] args)` TODO Describe this method
    `protected java.lang.Object` | `invokeMethodOnSubjectService(java.lang.reflect.Method method, java.lang.Object[] args)` TODO Describe this method
    `protected abstract boolean` | `isAdaptArgumentType(java.lang.reflect.Method method, java.lang.Object[] args)` TODO Describe this method
    `protected abstract boolean` | `isAdaptReturnType(java.lang.reflect.Method method, java.lang.Object[] args)` TODO Describe this method
    `protected boolean` | `isAnnotated(java.lang.reflect.Method method)` TODO Describe this method
    `protected boolean` | `isArray(java.lang.Object object)` TODO Describe this method
    `protected boolean` | `isCollection(java.lang.Object object)` TODO Describe this method
    `protected boolean` | `isCompatibleType(java.lang.Object object, java.lang.reflect.Method method)` Checks if the object passed is compatible to method return type
    `protected boolean` | `isDeclared(java.lang.reflect.Method method, java.lang.Class[] interfaces)` TODO Describe this method
    `protected boolean` | `isHandleByAdapter(java.lang.reflect.Method method)` TODO Describe this method
    `protected boolean` | `isProxy(java.lang.Object object)` TODO Describe this method
    `protected boolean` | `isSimilar(java.lang.reflect.Method m1, java.lang.reflect.Method m2)` Checks if two methods passed have similar name,this might extend in future
    `protected java.lang.Class` | `loadClass(java.lang.String className)`
    `static void` | `printFields(java.lang.Class cl)`
    `protected void` | `printFields(java.lang.Object object)`
    `protected void` | `printInterfaceNames(java.lang.Object o)`
    `protected java.lang.String` | `printMethodInfo(java.lang.reflect.Method method)` TODO Describe this method
    `protected void` | `printMethods(java.lang.Object object)`
    `protected void` | `printParameterizedTypeInfo(java.lang.reflect.ParameterizedType paramType)`
    `protected java.lang.Object` | `proxyIt(java.lang.Object object, java.lang.Class componentType)`
    `protected java.lang.Object` | `proxyIt(java.lang.Object object, java.lang.reflect.Method method)` TODO Describe this method
    `protected java.lang.String` | `setterMethod(java.lang.String fieldName)` TODO Describe this method
    `protected java.lang.Object` | `unProxy(java.lang.Object proxy)` TODO Describe this method

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

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

- - ### Field Detail

    - #### serviceAdapter

          protected Processor serviceAdapter

    - #### subjectService

          protected java.lang.Object subjectService

    - #### isBindingMethod

          protected boolean isBindingMethod

    - #### handler

          protected AdapterExceptionHandler handler

  - ### Constructor Detail

    - #### AbstractAdapterHandler

          public AbstractAdapterHandler(Processor serviceAdapter,
                                        java.lang.Object subjectService)

      TODO Describe this method
      Parameters:
        `serviceAdapter` -
        `subjectService` -

  - ### Method Detail

    - #### invoke

          public java.lang.Object invoke(java.lang.Object proxy,
                                         java.lang.reflect.Method method,
                                         java.lang.Object[] args)
                                  throws java.lang.Throwable

      Specified by:
        `invoke` in interface `java.lang.reflect.InvocationHandler`
      Throws:
        `java.lang.Throwable`

    - #### handleServiceInvocation

          protected abstract java.lang.Object handleServiceInvocation(java.lang.Object proxy,
                                                                      java.lang.reflect.Method method,
                                                                      java.lang.Object[] args)
                                                               throws java.lang.Throwable

      TODO Describe this method
      Parameters:
        `proxy` -
        `method` -
        `args` -
      Returns:
      Throws:
        `java.lang.Throwable`

    - #### isAdaptReturnType

          protected abstract boolean isAdaptReturnType(java.lang.reflect.Method method,
                                                       java.lang.Object[] args)

      TODO Describe this method
      Parameters:
        `method` -
        `args` -
      Returns:

    - #### isAdaptArgumentType

          protected abstract boolean isAdaptArgumentType(java.lang.reflect.Method method,
                                                         java.lang.Object[] args)

      TODO Describe this method
      Parameters:
        `method` -
        `args` -
      Returns:

    - #### getComponentType

          protected java.lang.Class getComponentType()

      TODO Describe this method
      Returns:

    - #### invokeMethodOnSubjectService

          protected java.lang.Object invokeMethodOnSubjectService(java.lang.reflect.Method method,
                                                                  java.lang.Object[] args)
                                                           throws java.lang.Throwable

      TODO Describe this method
      Parameters:
        `method` -
        `args` -
      Returns:
      Throws:
        `java.lang.Throwable`

    - #### invokeMethodOnServiceAdapter

          protected java.lang.Object invokeMethodOnServiceAdapter(java.lang.reflect.Method method,
                                                                  java.lang.Object[] args)
                                                           throws java.lang.Throwable

      TODO Describe this method
      Parameters:
        `method` -
        `args` -
      Returns:
      Throws:
        `java.lang.Throwable`

    - #### isHandleByAdapter

          protected boolean isHandleByAdapter(java.lang.reflect.Method method)

      TODO Describe this method
      Parameters:
        `method` -
      Returns:
      Throws:
        `java.lang.Throwable`

    - #### hookBeforeInvocation

          protected java.lang.Object hookBeforeInvocation(java.lang.Object object,
                                                          java.lang.reflect.Method method,
                                                          java.lang.Object[] args)
                                                   throws java.lang.Throwable

      TODO Describe this method
      Parameters:
        `object` -
        `method` -
      Returns:
      Throws:
        `java.lang.Throwable`

    - #### adaptReturnType

          protected java.lang.Object adaptReturnType(java.lang.Object object,
                                                     java.lang.reflect.Method method)

      TODO Describe this method
      Parameters:
        `object` -
        `method` -
      Returns:

    - #### proxyIt

          protected java.lang.Object proxyIt(java.lang.Object object,
                                             java.lang.reflect.Method method)

      TODO Describe this method
      Parameters:
        `object` -
        `method` -
      Returns:

    - #### proxyIt

          protected java.lang.Object proxyIt(java.lang.Object object,
                                             java.lang.Class componentType)

    - #### isCompatibleType

          protected boolean isCompatibleType(java.lang.Object object,
                                             java.lang.reflect.Method method)

      Checks if the object passed is compatible to method return type
      Parameters:
        `object` -
        `method` -
      Returns:

    - #### isSimilar

          protected boolean isSimilar(java.lang.reflect.Method m1,
                                      java.lang.reflect.Method m2)

      Checks if two methods passed have similar name,this might extend in future
      Parameters:
        `m1` -
        `m2` -
      Returns:

    - #### getDeclaredMatchingMethod

          protected java.lang.reflect.Method getDeclaredMatchingMethod(java.lang.Object object,
                                                                       java.lang.reflect.Method method)

      TODO Describe this method
      Parameters:
        `object` -
        `method` -
      Returns:

    - #### getDeclaredMatchingMethod

          protected java.lang.reflect.Method getDeclaredMatchingMethod(java.lang.Class[] interfaces,
                                                                       java.lang.reflect.Method method)

      TODO Describe this method
      Parameters:
        `interfaces` -
        `method` -
      Returns:

    - #### getDeclaredMatchingMethod

          protected java.lang.reflect.Method getDeclaredMatchingMethod(java.lang.Class clazz,
                                                                       java.lang.reflect.Method method)

      TODO Describe this method
      Parameters:
        `clazz` -
        `method` -
      Returns:

    - #### getMatchingMethod

          @Deprecated
          protected java.lang.reflect.Method getMatchingMethod(java.lang.Object object,
                                                                           java.lang.reflect.Method method)

      Deprecated.
      TODO Describe this method
      Parameters:
        `object` -
        `method` -
      Returns:

    - #### getMatchingMethod

          @Deprecated
          protected java.lang.reflect.Method getMatchingMethod(java.lang.Object object,
                                                                           java.lang.String methodName)

      Deprecated.
      TODO Describe this method
      Parameters:
        `object` -
        `methodName` -
      Returns:

    - #### adaptArguments

          protected java.lang.Object[] adaptArguments(java.lang.reflect.Method subjectMethod,
                                                      java.lang.Object[] args)

      TODO Describe this method
      Parameters:
        `subjectMethod` -
        `args` -
      Returns:

    - #### getAllFields

          protected java.lang.reflect.Field[] getAllFields(java.lang.Object object)

      TODO Describe this method
      Parameters:
        `object` -
      Returns:

    - #### getFieldValue

          protected java.lang.Object getFieldValue(java.lang.Object object,
                                                   java.lang.String fieldName)

      TODO Describe this method
      Parameters:
        `object` -
        `fieldName` -
      Returns:

    - #### isProxy

          protected boolean isProxy(java.lang.Object object)

      TODO Describe this method
      Parameters:
        `object` -
      Returns:

    - #### unProxy

          protected java.lang.Object unProxy(java.lang.Object proxy)

      TODO Describe this method
      Parameters:
        `proxy` -
      Returns:

    - #### printFields

          public static void printFields(java.lang.Class cl)

    - #### isArray

          protected boolean isArray(java.lang.Object object)

      TODO Describe this method
      Parameters:
        `object` -
      Returns:

    - #### getAllInterfaces

          protected java.lang.Class[] getAllInterfaces(java.lang.Object object)

      TODO Describe this method
      Parameters:
        `object` -
      Returns:

    - #### isCollection

          protected boolean isCollection(java.lang.Object object)

      TODO Describe this method
      Parameters:
        `object` -
      Returns:

    - #### getInterface

          protected java.lang.Class getInterface(java.lang.Object object,
                                                 java.lang.String interfaceName)

      TODO Describe this method
      Parameters:
        `object` -
        `interfaceName` -
      Returns:

    - #### handleCollection

          protected java.lang.Object handleCollection(java.lang.Object object,
                                                      java.lang.reflect.Method method)

      TODO Describe this method
      Parameters:
        `object` -
        `method` -
      Returns:

    - #### getIterator

          protected java.util.Iterator getIterator(java.lang.Object object,
                                                   java.lang.reflect.Method method)
                                            throws java.lang.Throwable

      Throws:
        `java.lang.Throwable`

    - #### handleArray

          protected java.lang.Object handleArray(java.lang.Object object,
                                                 java.lang.reflect.Method method)

      TODO Describe this method
      Parameters:
        `object` -
        `method` -
      Returns:

    - #### getReturnParameterizedType

          protected java.lang.Class getReturnParameterizedType(java.lang.reflect.Method method)

    - #### loadClass

          protected java.lang.Class loadClass(java.lang.String className)
                                       throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getterMethod

          protected java.lang.String getterMethod(java.lang.String fieldName)

      TODO Describe this method
      Parameters:
        `fieldName` -
      Returns:

    - #### setterMethod

          protected java.lang.String setterMethod(java.lang.String fieldName)

      TODO Describe this method
      Parameters:
        `fieldName` -
      Returns:

    - #### printMethodInfo

          protected java.lang.String printMethodInfo(java.lang.reflect.Method method)

      TODO Describe this method
      Parameters:
        `method` -

    - #### printInterfaceNames

          protected void printInterfaceNames(java.lang.Object o)

    - #### printMethods

          protected void printMethods(java.lang.Object object)

    - #### printFields

          protected void printFields(java.lang.Object object)

    - #### printParameterizedTypeInfo

          protected void printParameterizedTypeInfo(java.lang.reflect.ParameterizedType paramType)

    - #### invokeMethod

          protected java.lang.Object invokeMethod(java.lang.Object obj,
                                                  java.lang.reflect.Method method,
                                                  java.lang.Object[] args)
                                           throws java.lang.Throwable

      TODO Describe this method
      Parameters:
        `obj` -
        `method` -
        `args` -
      Returns:
      Throws:
        `java.lang.Throwable`

    - #### invokeMethod

          protected java.lang.Object invokeMethod(java.lang.Object obj,
                                                  java.lang.reflect.Method method,
                                                  java.lang.Object[] args,
                                                  boolean isMatching)
                                           throws java.lang.Throwable

      TODO Describe this method
      Parameters:
        `obj` -
        `method` -
        `args` -
      Returns:
      Throws:
        `java.lang.Throwable`

    - #### isDeclared

          protected boolean isDeclared(java.lang.reflect.Method method,
                                       java.lang.Class[] interfaces)

      TODO Describe this method
      Parameters:
        `method` -
        `interfaces` -
      Returns:

    - #### considerMethodAnnotations

          protected java.lang.reflect.Method considerMethodAnnotations(java.lang.reflect.Method method,
                                                                       java.lang.Object[] args)

      TODO Describe this method
      Parameters:
        `method` -
        `args` -
      Returns:

    - #### isAnnotated

          protected boolean isAnnotated(java.lang.reflect.Method method)

      TODO Describe this method
      Parameters:
        `method` -
      Returns:

    - #### getAdaptedMethod

          protected java.lang.reflect.Method getAdaptedMethod(java.lang.reflect.Method method)

      TODO Describe this method
      Parameters:
        `method` -
      Returns:

    - #### getAuditAction

          protected static AuditActions getAuditAction(java.lang.reflect.Method method)

      TODO Describe this method
      Parameters:
        `method` -
      Returns:

Copyright © 2018 TIBCO Software Inc. All Rights Reserved.