@Retention(value=RUNTIME) @Target(value=METHOD) @Documented public @interface HierarchyTraversal
As annotations are not inherited any annotation tool should traverse up the type structure of an object under annotation to determine the possible child-parent relationships from superclasses and implemented interfaces.
There is no guarantee that the return types from annotated members implement Annotated, in these cases traversal should still be followed to cover cases where a grandchild of an object is annotatable even though all children are not.
This should only be applied to method with no arguments, if this is not the case an annotation tool is free to not follow such methods (as it has no way to determine what should be applied as arguments)
|Modifier and Type||Required Element and Description|
It is possible for multiple orthogonal containment hierarchies to exist, to allow for this the hierarchies are named using this field.
The role the return type of the annotated method plays in the named hierarchy relative to the containing type.
public abstract HierarchyRole role
public abstract String hierarchies
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.