com.fasterxml.classmate
Class Annotations

java.lang.Object
  extended by com.fasterxml.classmate.Annotations

public class Annotations
extends Object

Container class used for storing set of annotations resolved for types (classes) as members (methods, fields, constructors).

Author:
tatu

Field Summary
protected  HashMap<Class<? extends Annotation>,Annotation> _annotations
           
 
Constructor Summary
Annotations()
           
 
Method Summary
 void add(Annotation override)
          Method for adding specified annotation, overriding existing value for the annotation type.
 void addAll(Annotations overrides)
          Method for adding all annotations from specified set, as overrides to annotations this set has
 void addAsDefault(Annotation defValue)
          Method for adding specified annotation if and only if no value exists for the annotation type.
<A extends Annotation>
A
get(Class<A> cls)
           
 int size()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_annotations

protected HashMap<Class<? extends Annotation>,Annotation> _annotations
Constructor Detail

Annotations

public Annotations()
Method Detail

add

public void add(Annotation override)
Method for adding specified annotation, overriding existing value for the annotation type.


addAll

public void addAll(Annotations overrides)
Method for adding all annotations from specified set, as overrides to annotations this set has


addAsDefault

public void addAsDefault(Annotation defValue)
Method for adding specified annotation if and only if no value exists for the annotation type.


size

public int size()

get

public <A extends Annotation> A get(Class<A> cls)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 fasterxml.com. All Rights Reserved.