Interface Layers

All Superinterfaces:
Iterable<Layer>
All Known Implementing Classes:
CustomLayers, StandardLayers

public interface Layers extends Iterable<Layer>
Interface to provide information about layers to the Repackager.
Since:
2.3.0
Author:
Madhura Bhave, Phillip Webb
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Layers
    The default layer resolver.
  • Method Summary

    Modifier and Type
    Method
    Description
    getLayer(String applicationResource)
    Return the layer that contains the given resource name.
    getLayer(Library library)
    Return the layer that contains the given library.
    Return the jar layers in the order that they should be added (starting with the least frequently changed layer).
    Return a stream of the jar layers in the order that they should be added (starting with the least frequently changed layer).

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Field Details

    • IMPLICIT

      static final Layers IMPLICIT
      The default layer resolver.
  • Method Details

    • iterator

      Iterator<Layer> iterator()
      Return the jar layers in the order that they should be added (starting with the least frequently changed layer).
      Specified by:
      iterator in interface Iterable<Layer>
      Returns:
      the layers iterator
    • stream

      Stream<Layer> stream()
      Return a stream of the jar layers in the order that they should be added (starting with the least frequently changed layer).
      Returns:
      the layers stream
    • getLayer

      Layer getLayer(String applicationResource)
      Return the layer that contains the given resource name.
      Parameters:
      applicationResource - the name of an application resource (for example a .class file).
      Returns:
      the layer that contains the resource (must never be null)
    • getLayer

      Layer getLayer(Library library)
      Return the layer that contains the given library.
      Parameters:
      library - the library to consider
      Returns:
      the layer that contains the resource (must never be null)