Package org.stianloader.picoresolve

# Class DependencyLayer

java.lang.Object
org.stianloader.picoresolve.DependencyLayer

public class DependencyLayer extends Object

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`DependencyLayer.DependencyEdge`
`static class`
`DependencyLayer.DependencyLayerElement`

## Field Summary

Fields
Modifier and Type
Field
Description
`final @NotNull List<@NotNull DependencyLayer.DependencyLayerElement>`
`elements`
`final @Nullable DependencyLayer`
`parent`

## Constructor Summary

Constructors
Constructor
Description
`DependencyLayer(@Nullable DependencyLayer parent, @NotNull List<@NotNull DependencyLayer.DependencyLayerElement> elements)`

## Method Summary

Modifier and Type
Method
Description
`static @NotNull DependencyLayer`
`createLayerFor(@NotNull GAV rootNode, @NotNull GAV @NotNull ... dependencies)`
Create a new `DependencyLayer` with the given `GAV` as the root node.
`@Nullable DependencyLayer`
`getChild()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### elements

@NotNull public final @NotNull List<@NotNull DependencyLayer.DependencyLayerElement> elements

### parent

@Nullable public final @Nullable DependencyLayer parent

## Constructor Details

### DependencyLayer

public DependencyLayer(@Nullable @Nullable DependencyLayer parent, @NotNull @NotNull List<@NotNull DependencyLayer.DependencyLayerElement> elements)

## Method Details

### createLayerFor

@NotNull @AvailableSince("1.1.1-a20260609") public static @NotNull DependencyLayer createLayerFor(@NotNull @NotNull GAV rootNode, @NotNull @NotNull GAV @NotNull ... dependencies)
Create a new `DependencyLayer` with the given `GAV` as the root node. The created `DependencyLayer` has no parent layer, making it most favourable for calls to `MavenResolver.resolveAllChildren(DependencyLayer, java.util.concurrent.Executor)`.

The `rootNode` `GAV` is typically a bogus GAV and ignored within the resolution process. However, sometimes it makes more sense to give it a sensical value such as the declaring POM's coordinates, though this is mostly only for presentation reasons.

Dependency edges are created using the `jar` extension, without a classifier, and the scope of `Scope.COMPILE`. Further, no exclusions are defined.

Parameters:
  `rootNode` - The root node of the dependency layer, see `DependencyLayer.DependencyLayerElement.gav`.
  `dependencies` - The `GAV` coordinates of the dependencies to resolve.
Returns:
  The created `DependencyLayer`.
Since:
  1.1.1-a20260609

### getChild

@Contract(pure=true) @Nullable public @Nullable DependencyLayer getChild()