Top Description Inners Constructors Methods
org.jboss.jandex

public abstract Class EquivalenceKey

extends Object
Class Inheritance
Known Direct Subclasses
org.jboss.jandex.EquivalenceKey.DeclarationEquivalenceKey, org.jboss.jandex.EquivalenceKey.TypeEquivalenceKey
Imports
java.util.Arrays, .HashSet, .Locale, .Objects, .Set, .StringJoiner

Establishes a notion of equivalence of Jandex objects. Two Jandex objects are equivalent if and only if they denote the same Java declaration or type, without taking into account any annotations. The prime use case is to assist with building annotation overlays on top of Jandex, where it is common to have multiple Jandex objects with different annotations, but otherwise equivalent.

In contrast, the common Jandex classes such as ClassInfo, MethodInfo or FieldInfo either don't provide equality at all (and hence can only be compared by identity) or provide strict equality, which includes presence or absence of annotations and comparison of their members, as well as other details.

An instance of this class, also called an equivalence key, provides 3 fundamental operations, corresponding to the 3 common methods all Java classes have:

In addition, equivalence keys are structured in an inheritance hierarchy that corresponds to the inheritance hierarchy of Jandex objects. Therefore, the kind of the "source" Jandex object may be found by inspecting the class of the equivalence key:

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class
public abstract static class
public static class
public static class
public static class
public static class
public static class
public static class
public abstract static class
public static class
public static class
public static class
public static class
public static class

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static EquivalenceKey

Returns:

equvalence key for given annotation target, only null if annotationTarget == null
of
(AnnotationTarget
the annotation target, may be null
annotationTarget
)

Returns an equivalence key for given annotation target.

public static EquivalenceKey.DeclarationEquivalenceKey

Returns:

equvalence key for given declaration, only null if declaration == null
of
(Declaration
the declaration, may be null
declaration
)

Returns an equivalence key for given declaration.

public static EquivalenceKey.ClassEquivalenceKey

Returns:

equvalence key for given class, only null if clazz == null
of
(ClassInfo
the class, may be null
clazz
)

Returns an equivalence key for given class.

public static EquivalenceKey.MethodEquivalenceKey

Returns:

equvalence key for given method, only null if method == null
of
(MethodInfo
the method, may be null
method
)

Returns an equivalence key for given method.

public static EquivalenceKey.MethodParameterEquivalenceKey

Returns:

equvalence key for given method parameter, only null if parameter == null
of
(MethodParameterInfo
the method parameter, may be null
parameter
)

Returns an equivalence key for given method parameter.

public static EquivalenceKey.FieldEquivalenceKey

Returns:

equvalence key for given field, only null if field == null
of
(FieldInfo
the field, may be null
field
)

Returns an equivalence key for given field.

public static EquivalenceKey.RecordComponentEquivalenceKey

Returns:

equvalence key for given record component, only null if recordComponent == null
of
(RecordComponentInfo
the record component, may be null
recordComponent
)

Returns an equivalence key for given record component.

public static EquivalenceKey.TypeEquivalenceKey

Returns:

equvalence key for given type target, only null if typeTarget == null
of
(TypeTarget
the type target, may be null
typeTarget
)

Returns an equivalence key for given type annotation target.

public static EquivalenceKey.TypeEquivalenceKey

Returns:

equvalence key for given type, only null if type == null
of
(Type
the type, may be null
type
)

Returns an equivalence key for given type.

private static EquivalenceKey.TypeEquivalenceKey[]
of(Type[] types)

private static String
pack-priv String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait