Top Description Fields Constructors Methods
org.hibernate.validator.cfg

public abstract Class AnnotationDef<C extends org.hibernate.validator.cfg.AnnotationDef<C, A>, A extends java.lang.annotation.Annotation>

extends Object
Class Inheritance
Known Direct Subclasses
org.hibernate.validator.cfg.ConstraintDef
Type Parameters
<C>
The type of a concrete sub type. Following to the "self referencing generic type" pattern each sub type has to be parametrized with itself.
<A>
The constraint annotation type represented by a concrete sub type.
Imports
java.lang.annotation.Annotation, java.lang.invoke.MethodHandles, java.lang.reflect.Array, java.util.Collections, .HashMap, .List, .Map, org.hibernate.validator.internal.util.CollectionHelper, org.hibernate.validator.internal.util.annotation.AnnotationDescriptor, org.hibernate.validator.internal.util.logging.Log, .LoggerFactory

Base class for all annotation definition types.

Note that any protected member in this type and its subtypes are not part of the public API and are only meant for internal use.

Authors
Hardy Ferentschik, Gunnar Morling, Marko Bekhta, Guillaume Smet

Field Summary

Modifier and TypeField and Description
private final AnnotationDescriptor.Builder<A>
annotationDescriptorBuilder

The annotation descriptor builder.

private final Map<String, List<AnnotationDef<?, ?>>>
annotationsAsParameters

A map with annotation parameters of this definition which are annotations on their own.

private final Map<String, Class<?>>
annotationsAsParametersTypes

A map of annotation types that are added to AnnotationDef#annotationsAsParameters.

private static final Log

Constructor Summary

AccessConstructor and Description
protected
AnnotationDef(Class<A> annotationType)

protected
AnnotationDef(AnnotationDef<?, A> original)

Method Summary

Modifier and TypeMethod and Description
protected C
protected C
private AnnotationDescriptor<A>
private A
private C
private <T> T[]
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

annotationDescriptorBuilderback to summary
private final AnnotationDescriptor.Builder<A> annotationDescriptorBuilder

The annotation descriptor builder.

annotationsAsParametersback to summary
private final Map<String, List<AnnotationDef<?, ?>>> annotationsAsParameters

A map with annotation parameters of this definition which are annotations on their own. Keys are property names of this definition's annotation type, values are annotation parameter values of the appropriate annotation types described via AnnotationDef. If an array of annotations is needed it should be represented via java.util.List of corresponding AnnotationDefs.

annotationsAsParametersTypesback to summary
private final Map<String, Class<?>> annotationsAsParametersTypes

A map of annotation types that are added to AnnotationDef#annotationsAsParameters. For the same key form AnnotationDef#annotationsAsParameters you'll get an annotation type represented by corresponding AnnotationDef

LOGback to summary
private static final Log LOG

Constructor Detail

AnnotationDefback to summary
protected AnnotationDef(Class<A> annotationType)
AnnotationDefback to summary
protected AnnotationDef(AnnotationDef<?, A> original)

Method Detail

addAnnotationAsParameterback to summary
protected C addAnnotationAsParameter(String key, AnnotationDef<?, ?> value)
addParameterback to summary
protected C addParameter(String key, Object value)
createAnnotationDescriptorback to summary
private AnnotationDescriptor<A> createAnnotationDescriptor()
createAnnotationProxyback to summary
private A createAnnotationProxy()
getThisback to summary
private C getThis()
Annotations
@SuppressWarnings:unchecked
toAnnotationParameterArrayback to summary
private <T> T[] toAnnotationParameterArray(List<AnnotationDef<?, ?>> list, Class<T> aClass)
Annotations
@SuppressWarnings:unchecked
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override