public class CachingInheritanceProvider extends Object implements InheritanceProvider
InheritanceProvider that wraps another InheritanceProvider
and caches all requests. If information is needed more than once, use of this
class is recommended to improve performance.InheritanceProvider.ClassInfo| Constructor and Description |
|---|
CachingInheritanceProvider(InheritanceProvider provider) |
| Modifier and Type | Method and Description |
|---|---|
Optional<InheritanceProvider.ClassInfo> |
provide(String klass)
Gets the class information for the given class name, if available.
|
Optional<InheritanceProvider.ClassInfo> |
provide(String klass,
Object context)
Gets the class information for the given class name and optional context, if available.
|
public CachingInheritanceProvider(InheritanceProvider provider)
public Optional<InheritanceProvider.ClassInfo> provide(String klass)
InheritanceProviderprovide in interface InheritanceProviderklass - The class nameOptionalpublic Optional<InheritanceProvider.ClassInfo> provide(String klass, Object context)
InheritanceProviderThe provided context may be used by the InheritanceProvider to avoid
looking up the class by its name. The accepted values are specific to each
InheritanceProvider; unknown context should be ignored.
provide in interface InheritanceProviderklass - The class namecontext - Additional context related to the class nameOptional