[jps] doc: add javadoc to ModuleChunk

GitOrigin-RevId: aca607aa12369b6d8b6b06c9f222625fd76df95e
This commit is contained in:
Nikolay Chashnikov
2024-02-26 13:49:13 +01:00
committed by intellij-monorepo-bot
parent e27dc41496
commit 476e17ed93
2 changed files with 12 additions and 2 deletions

View File

@@ -12,6 +12,11 @@ import org.jetbrains.jps.model.module.JpsModule;
import java.util.LinkedHashSet;
import java.util.Set;
/**
* Represents a single {@link ModuleBuildTarget} or a set of {@link ModuleBuildTarget} which circularly depend on each other.
* Since it isn't possible to compile modules which form a circular dependency one by one, the whole {@link ModuleChunk} is passed to
* {@link org.jetbrains.jps.incremental.ModuleLevelBuilder#build} method.
*/
public final class ModuleChunk {
private static final NotNullFunction<JpsModule,String> GET_NAME = dom -> dom.getName();
private final Set<JpsModule> myModules;
@@ -69,7 +74,10 @@ public final class ModuleChunk {
return getName();
}
public ModuleBuildTarget representativeTarget() {
/**
* Returns an arbitrary target included in the chunk.
*/
public @NotNull ModuleBuildTarget representativeTarget() {
return myTargets.iterator().next();
}
}

View File

@@ -9,7 +9,9 @@ import java.util.Collections;
import java.util.Set;
/**
* Represents a single build target or a set of build targets which circularly depend on each other.
* Represents a single build target or a set of build targets which circularly depend on each other.
* Currently, circular dependencies are allowed between {@link org.jetbrains.jps.incremental.ModuleBuildTarget} only, in that case targets
* which are included in the cycle, compose {@link ModuleChunk}.
*/
public final class BuildTargetChunk {
private final Set<? extends BuildTarget<?>> myTargets;