public abstract List<? extends Element> getEnclosedElements ()

Returns the elements that are, loosely speaking, directly enclosed by this element. A class or is considered to enclose the fields, methods, constructors, and member types that it directly declares. A package encloses the top-level classes and interfaces within it, but is not considered to enclose subpackages. A module encloses packages within it. Enclosed elements may include implicitly declared mandated elements. Other kinds of elements are not currently considered to enclose any elements; however, that may change as this API or the programming language evolves.

Returns:  the enclosed elements, or an empty list if none

See also:
TypeElement.getEnclosedElements, PackageElement.getEnclosedElements, ModuleElement.getEnclosedElements, Elements.getAllMembers

@apiNote Elements of certain kinds can be isolated using methods in ElementFilter.
@jls 8.8.9 Default Constructor
@jls 8.9 Enums
@revised 9
@spec JPMS