Class ClassFieldMap
java.lang.Object
org.apache.velocity.util.introspection.ClassFieldMap
A cache of introspection information for a specific class instance.
Keys
Field
objects by the field names.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Class<?>
Class passed into the constructor used to as the basis for the Field map.private static final boolean
Set true if you want to debug the reflection codeString --> Field map, the key is the field nameprivate final org.slf4j.Logger
Class logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPopulate the Map of direct hits.Find a Field using the field name.Class<?>
Returns the class object whose fields are cached by this map.private void
populateFieldCacheWith
(Map<String, Field> fieldCache, Class<?> classToReflect) private void
populateFieldCacheWithInterface
(Map<String, Field> fieldCache, Class<?> iface)
-
Field Details
-
debugReflection
private static final boolean debugReflectionSet true if you want to debug the reflection code- See Also:
-
log
private final org.slf4j.Logger logClass logger -
clazz
Class passed into the constructor used to as the basis for the Field map. -
fieldCache
String --> Field map, the key is the field name
-
-
Constructor Details
-
ClassFieldMap
Standard constructor- Parameters:
clazz
- The class for which this ClassMap gets constructed.log
- logger
-
-
Method Details
-
getCachedClass
Returns the class object whose fields are cached by this map.- Returns:
- The class object whose fields are cached by this map.
-
findField
Find a Field using the field name.- Parameters:
name
- The field name to look up.- Returns:
- A Field object representing the field to invoke or null.
-
createFieldCache
Populate the Map of direct hits. These are taken from all the public fields that our class, its parents and their implemented interfaces provide. -
populateFieldCacheWithInterface
-
populateFieldCacheWith
-