Interface ModuleInfoItem


public interface ModuleInfoItem
These are the individual items that compose the ModuleInfoDescriptor builder.

Note that generally speaking the majority of use cases can use methods from ModuleInfoDescriptor instead of needing to use anything provided here.

  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Provides the content of the description item appropriate to write out.
    boolean
    Returns true if this is using a exports definition.
    boolean
    Returns true if this is using a static definition.
    boolean
    Returns true if this is using a transitive definition.
    Provides the ability to create a new merged descriptor item using this as the basis, and then combining another into it in order to create a new descriptor item.
    boolean
    Returns true if this is using a open definition.
    Applicable if the target is referencing a list of target class or package names.
    The comments that proceed the item definition.
    boolean
    Returns true if this is using a provides definition.
    boolean
    Returns true if this is a requires definition.
    The target class name, package name, or module name this item applies to.
    boolean
    Returns true if this is a uses definition.
    Any with or to definitions.
    default Set<String>
    If there is any ordering() establish requiring a sort then a new sorted set will be returned.
  • Method Details

    • precomments

      Set<String> precomments()
      The comments that proceed the item definition.
      Returns:
      pre-comments
    • target

      String target()
      The target class name, package name, or module name this item applies to.
      Returns:
      target
    • requires

      boolean requires()
      Returns true if this is a requires definition.
      Returns:
      true if this item is using requires
    • uses

      boolean uses()
      Returns true if this is a uses definition.
      Returns:
      true if this item is using requires
    • isTransitiveUsed

      boolean isTransitiveUsed()
      Returns true if this is using a transitive definition.
      Returns:
      true if this item is using transitive
    • isStaticUsed

      boolean isStaticUsed()
      Returns true if this is using a static definition.
      Returns:
      true if this item is using static
    • exports

      boolean exports()
      Returns true if this is using a exports definition.
      Returns:
      true if this item is using exports
    • opens

      boolean opens()
      Returns true if this is using a open definition.
      Returns:
      true if this item is using opens
    • provides

      boolean provides()
      Returns true if this is using a provides definition.
      Returns:
      true if this item is using provides
    • ordering

      Applicable if the target is referencing a list of target class or package names.
      Returns:
      ordering
    • withOrTo

      Set<String> withOrTo()
      Any with or to definitions.
      Returns:
      the set of with or to definitions
    • withOrToSorted

      default Set<String> withOrToSorted()
      If there is any ordering() establish requiring a sort then a new sorted set will be returned.
      Returns:
      optionally the sorted set, else it is the same as withOrTo()
    • contents

      default String contents()
      Provides the content of the description item appropriate to write out.
      Returns:
      the contents (source code body) for this descriptor item
    • mergeCreate

      default ModuleInfoItem mergeCreate(ModuleInfoItem another)
      Provides the ability to create a new merged descriptor item using this as the basis, and then combining another into it in order to create a new descriptor item.
      Parameters:
      another - the other descriptor item to merge
      Returns:
      the merged descriptor