public class Attributes extends Object
PropertyFactory implementations should have a constructor that takes a single
Attributes instance.PropertyFactory| Constructor and Description |
|---|
Attributes(Annotation... attrs)
Construct a new set of attributes from the given annotations.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Annotation> |
getAttribute(Class<T> cls)
Get the attribute annotation of type T.
|
Collection<Annotation> |
getAttributes() |
boolean |
hasAttribute(Class<? extends Annotation> cls)
Get whether or not this set of attributes has an attribute of the given type.
|
public Attributes(Annotation... attrs)
attrs - The annotations from the method, or field, etc.NullPointerException - if attrs is null or contains null elementspublic <T extends Annotation> T getAttribute(Class<T> cls)
cls - The attribute annotation class typepublic boolean hasAttribute(Class<? extends Annotation> cls)
cls - The annotation class typepublic Collection<Annotation> getAttributes()
Copyright © 2013. All Rights Reserved.