to.etc.util
Class ClassUtilCached

java.lang.Object
  extended by to.etc.util.ClassUtilCached

public class ClassUtilCached
extends java.lang.Object

Like ClassUtil, but this caches the retrieved information.

Author:
Frits Jalvingh Created on Oct 13, 2010

Nested Class Summary
static class ClassUtilCached.ClassInfo
           
 
Constructor Summary
ClassUtilCached()
           
 
Method Summary
 PropertyInfo findProperty(java.lang.Class<?> clz, java.lang.String name)
          Locates a property using cached class property info.
 ClassUtilCached.ClassInfo getClassInfo(java.lang.Class<?> clz)
          Get all information for a given class from cache if possible, create and cache it if needed.
static ClassUtilCached getInstance()
          Get an instance to use for retrieving cached information.
 java.util.List<PropertyInfo> getProperties(java.lang.Class<?> clz)
          Return a cached variant of properties for a class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassUtilCached

public ClassUtilCached()
Method Detail

getInstance

@Nonnull
public static ClassUtilCached getInstance()
Get an instance to use for retrieving cached information.

Returns:

getClassInfo

@Nonnull
public ClassUtilCached.ClassInfo getClassInfo(@Nonnull
                                                      java.lang.Class<?> clz)
Get all information for a given class from cache if possible, create and cache it if needed.

Parameters:
clz -
Returns:

getProperties

@Nonnull
public java.util.List<PropertyInfo> getProperties(java.lang.Class<?> clz)
Return a cached variant of properties for a class.

Parameters:
clz -
Returns:

findProperty

@Nullable
public PropertyInfo findProperty(java.lang.Class<?> clz,
                                          java.lang.String name)
Locates a property using cached class property info.

Parameters:
clz -
name -
Returns: