com.hammurapi.extract

## Class MethodExtractor<T,V,C>

- java.lang.Object
- - com.hammurapi.extract.ExtractorBase<T,V,C>
  - - com.hammurapi.extract.MethodExtractor<T,V,C>

- All Implemented Interfaces:
    Extractor<T,V,C>

      public class MethodExtractor<T,V,C>
      extends ExtractorBase<T,V,C>
      implements Extractor<T,V,C>

- - ### Field Summary

    - ### Fields inherited from class com.hammurapi.extract.ExtractorBase

      `cost, costUnit, initialCost, invocations, nanos, totalCost`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MethodExtractor(double initialCost, TimeUnit costUnit, Method method)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected V` | `extractInternal(C context, Map<C,Map<Extractor<T,? super V,C>,? super V>> cache, T... obj)`
    `boolean` | `isContextDependent()`
    `Set<Integer>` | `parameterIndices()`

    - ### Methods inherited from class com.hammurapi.extract.ExtractorBase

      `compareTo, createCacheEntry, equals, extract, getCost`

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

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

    - ### Methods inherited from interface com.hammurapi.extract.Extractor

      `compareTo, extract, getCost`

- - ### Constructor Detail

    - #### MethodExtractor

          public MethodExtractor(double initialCost,
                         TimeUnit costUnit,
                         Method method)

  - ### Method Detail

    - #### parameterIndices

          public Set<Integer> parameterIndices()

      Specified by:
        `parameterIndices` in interface `Extractor<T,V,C>`
      Returns:
        Indexes of objects which this extractor uses for computations.

    - #### isContextDependent

          public boolean isContextDependent()

      Specified by:
        `isContextDependent` in interface `Extractor<T,V,C>`
      Returns:
        True if extractor uses context for extraction. False if only object(s) are used.

    - #### extractInternal

          protected V extractInternal(C context,
                          Map<C,Map<Extractor<T,? super V,C>,? super V>> cache,
                          T... obj)

      Specified by:
        `extractInternal` in class `ExtractorBase<T,V,C>`