public class CascadingInheritanceProvider extends Object implements InheritanceProvider
InheritanceProvider allows for class information to be
pooled from multiple sources.InheritanceProvider.ClassInfo| Constructor and Description |
|---|
CascadingInheritanceProvider() |
CascadingInheritanceProvider(List<InheritanceProvider> providers) |
| Modifier and Type | Method and Description |
|---|---|
CascadingInheritanceProvider |
install(InheritanceProvider provider)
Adds an
InheritanceProvider that can be used for obtaining class
information. |
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 CascadingInheritanceProvider(List<InheritanceProvider> providers)
public CascadingInheritanceProvider()
public CascadingInheritanceProvider install(InheritanceProvider provider)
InheritanceProvider that can be used for obtaining class
information.provider - The inheritance providerthis, for chainingpublic 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