Author: ivaynberg
Date: Mon May 17 21:23:22 2010
New Revision: 945375
URL: http://svn.apache.org/viewvc?rev=945375&view=rev
Log:
javadoc tweaks
Modified:
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/collections/ClassMetaCache.java
Modified:
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/collections/ClassMetaCache.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/collections/ClassMetaCache.java?rev=945375&r1=945374&r2=945375&view=diff
==============================================================================
---
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/collections/ClassMetaCache.java
(original)
+++
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/collections/ClassMetaCache.java
Mon May 17 21:23:22 2010
@@ -6,9 +6,10 @@ import java.util.WeakHashMap;
import java.util.concurrent.ConcurrentHashMap;
/**
- * This class wraps a WeakHashMap that holds one ConcurrentHashMap per
ClassLoader. In the rare
- * event of a previously unmapped ClassLoader, the WeakHashMap is replaced by
a new one. This avoids
- * any synchronization overhead, much like a {...@link
java.util.concurrent.CopyOnWriteArrayList}
+ * This class wraps a WeakHashMap that holds one ConcurrentHashMap per
+ * ClassLoader. In the rare event of a previously unmapped ClassLoader, the
+ * WeakHashMap is replaced by a new one. This avoids any synchronization
+ * overhead, much like a {...@link java.util.concurrent.CopyOnWriteArrayList}
*
* @param <T>
* type of objects stored in cache
@@ -21,8 +22,11 @@ public class ClassMetaCache<T>
* Puts value into cache
*
* @param key
+ * the class that will be used as the value's key
* @param value
- * @return value previously stored in cache for this key, or {...@code
null} if none
+ * the value that should be stored in cache
+ * @return value previously stored in cache for this key, or {...@code
null} if
+ * none
*/
public T put(Class<?> key, T value)
{
@@ -34,6 +38,7 @@ public class ClassMetaCache<T>
* Gets value from cache or returns {...@code null} if not in cache
*
* @param key
+ * the class that is the key for the value
* @return value stored in cache or {...@code null} if none
*/
public T get(Class<?> key)
@@ -52,8 +57,8 @@ public class ClassMetaCache<T>
/**
* @param classLoader
* @param create
- * @return a {...@link ConcurrentHashMap} mapping class names to
injectable fields, never
- * <code>null</code>
+ * @return a {...@link ConcurrentHashMap} mapping class names to
injectable
+ * fields, never <code>null</code>
*/
private ConcurrentHashMap<String, T> getClassLoaderCache(ClassLoader
classLoader, boolean create)
{
@@ -78,7 +83,7 @@ public class ClassMetaCache<T>
* don't write to current cache, copy
instead
*/
Map<ClassLoader,
ConcurrentHashMap<String, T>> newCache = new WeakHashMap<ClassLoader,
ConcurrentHashMap<String, T>>(
- cache);
+ cache);
newCache.put(classLoader, container);
cache =
Collections.unmodifiableMap(newCache);
}