Package org.springframework.context.expression

# Class AnnotatedElementKey

java.lang.Object
org.springframework.context.expression.AnnotatedElementKey

All Implemented Interfaces:
  `Comparable<AnnotatedElementKey>`

public final class AnnotatedElementKey extends Object implements Comparable<AnnotatedElementKey>
Represents an `AnnotatedElement` in a particular `Class` and is suitable for use as a cache key.

Since:
  4.2
Author:
  Costin Leau, Stephane Nicoll
See Also:
  - `CachedExpressionEvaluator`

## Constructor Summary

Constructors
Constructor
Description
`AnnotatedElementKey(AnnotatedElement element, Class<?> targetClass)`
Create a new instance with the specified `AnnotatedElement` and optional target `Class`.

## Method Summary

Modifier and Type
Method
Description
`int`
`compareTo(AnnotatedElementKey other)`
`boolean`
`equals(Object other)`
`int`
`hashCode()`
`String`
`toString()`

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

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

## Constructor Details

### AnnotatedElementKey

public AnnotatedElementKey(AnnotatedElement element, @Nullable Class<?> targetClass)
Create a new instance with the specified `AnnotatedElement` and optional target `Class`.

## Method Details

### equals

public boolean equals(@Nullable Object other)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### compareTo

public int compareTo(AnnotatedElementKey other)

Specified by:
  `compareTo` in interface `Comparable<AnnotatedElementKey>`