Interface CodeNodeContainer<I>

Type Parameters:
I - the type of the contained CodeItems.
All Superinterfaces:
CodeNode, CodeWithContext, Iterable<I>
All Known Subinterfaces:
CodeAnnotations, CodeConstructors, CodeExceptions, CodeFields, CodeGenericTypeParameters<P>, CodeImports, CodeMembers<M>, CodeMethods, CodeNestedTypes, CodeNodeItemContainer<I>, CodeNodeItemContainerFlat<I>, CodeNodeItemContainerFlatWithName<I>, CodeNodeItemContainerHierarchical<I>, CodeNodeItemContainerHierarchicalWithName<I>, CodeNodeItemContainerWithName<I>, CodeOperationArgs<A>, CodeOperations<O>, CodeParameters, CodePathElements, CodeProperties, CodeSourceDependencies<S>, CodeSuperTypes, CodeTypeParameters, CodeTypeVariables

public interface CodeNodeContainer<I> extends CodeNode, Iterable<I>
CodeItem containing CodeItems of a particular type. It groups these items and all the methods to operate on them. This makes the API more structured as you do not get too much methods for top-level types such as CodeType. Further it supports reuse and avoids redundant declaration of methods with their JavaDoc. So instead of Class.getDeclaredMethods() you will do CodeType.getMethods().getDeclared().
Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)
  • Method Details

    • getDeclared

      List<? extends I> getDeclared()
      Returns:
      all items directly contained in this container.
    • iterator

      default Iterator<I> iterator()
      Specified by:
      iterator in interface Iterable<I>
    • isEmpty

      default boolean isEmpty()
      Returns:
      true if this container is empty, false otherwise.