org.apache.wicket.util
Class ClassProvider<T>

java.lang.Object
  extended by org.apache.wicket.util.ClassProvider<T>
Type Parameters:
T - the type of the class
All Implemented Interfaces:
IProvider<java.lang.Class<T>>

public class ClassProvider<T>
extends java.lang.Object
implements IProvider<java.lang.Class<T>>

A provider which holds a reference to a class in a WeakReference so that it can be collected by the GC when needed


Constructor Summary
ClassProvider(java.lang.Class<T> clazz)
          Construct.
 
Method Summary
 java.lang.Class<T> get()
          Provides an instance of type T
static
<T> ClassProvider<T>
of(java.lang.Class<T> clazz)
          Creates a provider for the specified class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassProvider

public ClassProvider(java.lang.Class<T> clazz)
Construct.

Parameters:
clazz -
Method Detail

get

public java.lang.Class<T> get()
Provides an instance of type T

Specified by:
get in interface IProvider<java.lang.Class<T>>
Returns:
instance of type T

of

public static <T> ClassProvider<T> of(java.lang.Class<T> clazz)
Creates a provider for the specified class

Type Parameters:
T - type of value
Parameters:
clazz - the class to provide
Returns:
provider


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.