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|
Creates a new instance with defaults: the common ancestor is
Creates a new instance with the given highest common ancestor.
|Modifier and Type||Method and Description|
Computes the ancestors of the given base class, optionally filtering out any ancestor that should not be scanned.
Objectexcluded, which implies that every ancestor of a mapped class, except
Objectitself, will be scanned for annotations.
public DefaultHierarchyScanStrategy(Class<?> highestAncestor, boolean included)
highestAncestor- The highest ancestor class to consider; cannot be
included- Whether or not to include the highest ancestor itself.
mappedClassin the returned list.
mappedClass- The mapped class; this is necessarily a class annotated with either
mappedClassitself and its ancestors, ordered from the lowest (closest to
mappedClass) to the highest (or farthest from
Copyright © 2012–2017. All rights reserved.