Interface SourceGroupRelativeModifierImplementation


public interface SourceGroupRelativeModifierImplementation
Intermediate level for more structured projects, where the simple type-based information are not sufficient to create an appropriate folder structure.

Prototypically used in J2SE Modular projects, where tests or sources belong to different modules, and it is critical to create the folder in the "correct" one.

The project can be partitioned to several (hiearchical) parts. SourceGroups for certain types/hints can be created in some of those parts (see SourceGroupModifierImplementation.canCreateSourceGroup(java.lang.String, java.lang.String). For example, java modular projects contains modules, a module may contain several places where sources are expected - these form the part hierarchy. When the original SourceGroup is specific enough, the hierarchy argument may be missing or can be even ignored by the modifier implementation - provided that the newly created folders have the correct relationship to the original source group.

Similar structure may be used in other types of projects. projectParts are abstract uninterpreted identifiers, so the implementation / project may choose any semantics suitable for the project type.

Since:
1.68
  • Method Details

    • relativeTo

      SourceGroupModifierImplementation relativeTo(SourceGroup existingGroup, String... projectPart)
      Returns Modifier, which is bound to a specific location or conceptual part of the project.
      Parameters:
      existingGroup - existing location or concept within the project
      projectPart - identifies part of the project. The meaning depends on the "existingGroup"
      Returns:
      modifier able to create folders, or null, if the specified project part does not exist