public class DefaultHierarchyScanStrategy extends Object implements HierarchyScanStrategy
HierarchyScanStrategy
.
This strategy assumes that there exists a common ancestor
for all mapped classes in the application, and allows all its
descendants (optionally including itself) to be scanned for annotations.Constructor and Description |
---|
DefaultHierarchyScanStrategy()
Creates a new instance with defaults:
the common ancestor is
Object excluded, which implies
that every ancestor of a mapped class, except Object itself,
will be scanned for annotations. |
DefaultHierarchyScanStrategy(Class<?> highestAncestor,
boolean included)
Creates a new instance with the given highest common ancestor.
|
Modifier and Type | Method and Description |
---|---|
List<Class<?>> |
filterClassHierarchy(Class<?> mappedClass)
Computes the ancestors of the given base class, optionally
filtering out any ancestor that should not be scanned.
|
public DefaultHierarchyScanStrategy()
Object
excluded, which implies
that every ancestor of a mapped class, except Object
itself,
will be scanned for annotations.public DefaultHierarchyScanStrategy(Class<?> highestAncestor, boolean included)
highestAncestor
- The highest ancestor class to consider; cannot be null
.included
- Whether or not to include the highest ancestor itself.public List<Class<?>> filterClassHierarchy(Class<?> mappedClass)
HierarchyScanStrategy
mappedClass
in the returned list.filterClassHierarchy
in interface HierarchyScanStrategy
mappedClass
- The mapped class; this is necessarily a class annotated with
either @Table
or
@UDT
.mappedClass
itself and its ancestors,
ordered from the lowest (closest to mappedClass
)
to the highest (or farthest from mappedClass
).Copyright © 2012–2018. All rights reserved.