jodd.introspector
Class AccessibleIntrospector

java.lang.Object
  extended by jodd.introspector.AccessibleIntrospector
All Implemented Interfaces:
Introspector
Direct Known Subclasses:
SupportedIntrospector

public class AccessibleIntrospector
extends Object
implements Introspector

Default introspector caches all class descriptors. Only accessible methods and fields are examined.

It does not provide any more subtle logic behind, therefore, it should not be used in environments with dynamic class re-loading. todo: add optional max value for total number of class descriptors stored in cache

See Also:
SupportedIntrospector

Field Summary
protected  Map<Class,ClassDescriptor> cache
           
 
Constructor Summary
AccessibleIntrospector()
           
 
Method Summary
protected  ClassDescriptor describeClass(Class type)
          Describes a class by creating a new instance of ClassDescriptor that examines all accessible methods and fields.
 ClassDescriptor lookup(Class type)
          Returns the ClassDescriptor object for specified class.
 ClassDescriptor register(Class type)
          Registers new class type.
 void reset()
          Resets current cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

protected final Map<Class,ClassDescriptor> cache
Constructor Detail

AccessibleIntrospector

public AccessibleIntrospector()
Method Detail

lookup

public ClassDescriptor lookup(Class type)
Returns the ClassDescriptor object for specified class.

Specified by:
lookup in interface Introspector

register

public ClassDescriptor register(Class type)
Registers new class type. If type already registered, it will be reset and registered again with new class descriptor.

Specified by:
register in interface Introspector

describeClass

protected ClassDescriptor describeClass(Class type)
Describes a class by creating a new instance of ClassDescriptor that examines all accessible methods and fields.


reset

public void reset()
Resets current cache.

Specified by:
reset in interface Introspector