org.springframework.cache.interceptor

## 类 SimpleKeyGenerator

- java.lang.Object
- - org.springframework.cache.interceptor.SimpleKeyGenerator

- 所有已实现的接口:
    KeyGenerator

      public class SimpleKeyGenerator
      extends Object
      implements KeyGenerator

  Simple key generator. Returns the parameter itself if a single non-null value is given, otherwise returns a `SimpleKey` of the parameters.

  No collisions will occur with the keys generated by this class. The returned `SimpleKey` object can be safely used with a `ConcurrentMapCache`, however, might not be suitable for all `Cache` implementations.

  从以下版本开始:
    4.0
  作者:
    Phillip Webb, Juergen Hoeller
  另请参阅:
    `SimpleKey`, `CachingConfigurer`

- - ### 构造器概要

    构造器
    构造器和说明
    `SimpleKeyGenerator()`

  - ### 方法概要

    所有方法 静态方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `Object` | `generate(Object target, Method method, Object... params)` Generate a key for the given method and its parameters.
    `static Object` | `generateKey(Object... params)` Generate a key based on the specified parameters.

    - ### 从类继承的方法 java.lang.Object

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

- - ### 构造器详细资料

    - #### SimpleKeyGenerator

          public SimpleKeyGenerator()

  - ### 方法详细资料

    - #### generate

          public Object generate(Object target,
                                 Method method,
                                 Object... params)

      从接口复制的说明: `KeyGenerator`
      Generate a key for the given method and its parameters.
      指定者:
        `generate` 在接口中 `KeyGenerator`
      参数:
        `target` - the target instance
        `method` - the method being called
        `params` - the method parameters (with any var-args expanded)
      返回:
        a generated key

    - #### generateKey

          public static Object generateKey(Object... params)

      Generate a key based on the specified parameters.