Package org.apache.velocity.util.introspection

# Class IntrospectorCache

java.lang.Object
org.apache.velocity.util.introspection.IntrospectorCache

public final class IntrospectorCache extends Object
This is the internal introspector cache implementation.

Since:
  1.5
Version:
  $Id$
Author:
  Henning P. Schmiedehausen, Candid Dauth

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`CACHEDUMP_MSG`
define a public string so that it can be looked for if interested

## Constructor Summary

Constructors
Constructor
Description
`IntrospectorCache(org.slf4j.Logger log, TypeConversionHandler conversionHandler)`
C'tor

## Method Summary

Modifier and Type
Method
Description
`void`
`clear()`
Clears the internal cache.
`ClassMap`
`get(Class<?> c)`
Lookup a given Class object in the cache.
`ClassFieldMap`
`getFieldMap(Class<?> c)`
Lookup a given Class object in the cache.
`ClassMap`
`put(Class<?> c)`
Creates a class map for specific class and registers it in the cache.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### CACHEDUMP_MSG

public static final String CACHEDUMP_MSG
define a public string so that it can be looked for if interested

See Also:
  - Constant Field Values

## Constructor Details

### IntrospectorCache

public IntrospectorCache(org.slf4j.Logger log, TypeConversionHandler conversionHandler)
C'tor

Parameters:
  `log` - logger.
  `conversionHandler` - conversion handler

## Method Details

### clear

public void clear()
Clears the internal cache.

### get

public ClassMap get(Class<?> c)
Lookup a given Class object in the cache. If it does not exist, check whether this is due to a class change and purge the caches eventually.

Parameters:
  `c` - The class to look up.
Returns:
  A ClassMap object or null if it does not exist in the cache.

### getFieldMap

public ClassFieldMap getFieldMap(Class<?> c)
Lookup a given Class object in the cache. If it does not exist, check whether this is due to a class change and purge the caches eventually.

Parameters:
  `c` - The class to look up.
Returns:
  A ClassFieldMap object or null if it does not exist in the cache.

### put

public ClassMap put(Class<?> c)
Creates a class map for specific class and registers it in the cache. Also adds the qualified name to the name->class map for later Classloader change detection.

Parameters:
  `c` - The class for which the class map gets generated.
Returns:
  A ClassMap object.