public final class AnnotationProxyBuilder<A extends Annotation> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AnnotationProxyBuilder.ConvertGroupAnnotation |
static class |
AnnotationProxyBuilder.ValidAnnotation |
Constructor and Description |
---|
AnnotationProxyBuilder(A annot,
ConcurrentMap<Class<?>,Method[]> cache)
Create a builder initially configured to create an annotation equivalent
to
annot . |
AnnotationProxyBuilder(Class<A> annotationType,
ConcurrentMap<Class<?>,Method[]> cache)
Create a new AnnotationProxyBuilder instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String elementName)
Learn whether a given element has been configured.
|
A |
createAnnotation()
Create the annotation represented by this builder.
|
Method[] |
getMethods() |
Class<A> |
getType()
Get the configured Annotation type.
|
Object |
getValue(String elementName)
Get the specified element value from the current configuration.
|
boolean |
isChanged() |
boolean |
setGroups(Class<?>[] groups)
Configure the well-known JSR303 "groups" element.
|
boolean |
setMessage(String message)
Configure the well-known JSR303 "message" element.
|
boolean |
setPayload(Class<? extends javax.validation.Payload>[] payload)
Configure the well-known JSR303 "payload" element.
|
boolean |
setValidationAppliesTo(javax.validation.ConstraintTarget constraintTarget)
Configure the well-known "validationAppliesTo" element.
|
boolean |
setValue(String elementName,
Object value)
Add an element to the configuration.
|
int |
size()
Get the number of configured elements.
|
AnnotationProxyBuilder(Class<A> annotationType, ConcurrentMap<Class<?>,Method[]> cache)
annotationType
- cache
- AnnotationProxyBuilder(A annot, ConcurrentMap<Class<?>,Method[]> cache)
annot
.annot
- Annotation to be replicated.cache
- public Method[] getMethods()
public boolean setValue(String elementName, Object value)
elementName
- value
- public Object getValue(String elementName)
elementName
- public boolean contains(String elementName)
elementName
- true
if an elementName
element is found
on this annotationpublic int size()
public boolean setMessage(String message)
message
- public boolean setGroups(Class<?>[] groups)
groups
- public boolean setPayload(Class<? extends javax.validation.Payload>[] payload)
payload
- public boolean setValidationAppliesTo(javax.validation.ConstraintTarget constraintTarget)
constraintTarget
- public boolean isChanged()
public A createAnnotation()
Annotation
Copyright © 2010–2020 The Apache Software Foundation. All rights reserved.