Interface Type


@Experimental @Immutable public interface Type
A dependency's Type is uniquely identified by a String, and semantically represents a known kind of dependency.

It provides information about the file type (or extension) of the associated artifact, its default classifier, and how the artifact will be used in the build when creating classpaths.

For example, the type java-source has a jar extension and a sources classifier. The artifact and its dependencies should be added to the classpath.

Since:
4.0.0
  • Field Details

  • Method Details

    • getId

      String getId()
      Returns the dependency type id. The id uniquely identifies this dependency type.
      Returns:
      the id of this type
    • getExtension

      String getExtension()
      Get the file extension of artifacts of this type.
      Returns:
      the file extension
    • getClassifier

      String getClassifier()
      Get the default classifier associated to the dependency type. The default classifier can be overridden when specifying the Dependency.getClassifier().
      Returns:
      the default classifier
    • isAddedToClasspath

      boolean isAddedToClasspath()
      Specifies if the artifact contains java classes and should be added to the classpath.
      Returns:
      if the artifact should be added to the classpath
    • isIncludesDependencies

      boolean isIncludesDependencies()
      Specifies if the artifact already embeds its own dependencies. This is the case for JEE packages or similar artifacts such as WARs, EARs, etc.
      Returns:
      if the artifact's dependencies are included in the artifact