org.rhq.helpers.perftest.support.jpa
Class Annotations

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<Class<?>,Object>
          extended by org.rhq.helpers.perftest.support.jpa.Annotations
All Implemented Interfaces:
Serializable, Cloneable, Map<Class<?>,Object>

public class Annotations
extends HashMap<Class<?>,Object>

A minimal extension of HashMap with Class keys and Object values. Provides only a convenience get(Class) method.

Author:
Lukas Krejci
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
Annotations()
           
Annotations(int initialCapacity)
           
Annotations(int initialCapacity, float loadFactor)
           
Annotations(Map<? extends Class<?>,? extends Object> m)
           
 
Method Summary
<T> T
get(Class<T> annotationClass)
          Returns the annotation of given class (if present in this map) cast to the class.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

Annotations

public Annotations()

Annotations

public Annotations(int initialCapacity,
                   float loadFactor)

Annotations

public Annotations(int initialCapacity)

Annotations

public Annotations(Map<? extends Class<?>,? extends Object> m)
Method Detail

get

public <T> T get(Class<T> annotationClass)
Returns the annotation of given class (if present in this map) cast to the class. This is a convenience method for the users of this class so that they don't have to cast the annotation object themselves.

Type Parameters:
T -
Parameters:
annotationClass -
Returns:


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.