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)
Create a builder initially configured to create an annotation equivalent
to
annot . |
AnnotationProxyBuilder(Class<A> annotationType)
Create a new AnnotationProxyBuilder instance.
|
AnnotationProxyBuilder(Class<A> annotationType,
Map<String,Object> elements)
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.
|
static <A> Method[] |
findMethods(Class<A> annotationType) |
Method[] |
getMethods() |
Class<A> |
getType()
Get the configured Annotation type.
|
Object |
getValue(String elementName)
Get the specified element value from the current configuration.
|
void |
putValue(String elementName,
Object value)
Add an element to the configuration.
|
void |
setGroups(Class<?>[] groups)
Configure the well-known JSR303 "groups" element.
|
void |
setMessage(String message)
Configure the well-known JSR303 "message" element.
|
void |
setPayload(Class<? extends javax.validation.Payload>[] payload)
Configure the well-known JSR303 "payload" element.
|
int |
size()
Get the number of configured elements.
|
public AnnotationProxyBuilder(Class<A> annotationType)
annotationType
- public AnnotationProxyBuilder(Class<A> annotationType, Map<String,Object> elements)
annotationType
- elements
- public AnnotationProxyBuilder(A annot)
annot
.annot
- Annotation to be replicated.public Method[] getMethods()
public void putValue(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 void setMessage(String message)
message
- public void setGroups(Class<?>[] groups)
groups
- public void setPayload(Class<? extends javax.validation.Payload>[] payload)
payload
- public A createAnnotation()
Annotation
Copyright © 2010–2024 The Apache Software Foundation. All rights reserved.