Interface Type

All Known Implementing Classes:
DefaultType

@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

      @Nonnull String getId()
      Returns the dependency type id. The id uniquely identifies this dependency type.
      Returns:
      the id of this type, never null.
    • getLanguage

      String getLanguage()
      Returns the dependency type language.
      Returns:
      the language of this type, never null.
    • getExtension

      @Nonnull String getExtension()
      Get the file extension of artifacts of this type.
      Returns:
      the file extension, never null.
    • getClassifier

      @Nullable 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, or null.
    • isAddedToClassPath

      default 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 class path
    • isIncludesDependencies

      default 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
    • getDependencyProperties

      @Nonnull DependencyProperties getDependencyProperties()
      Gets the default properties associated with this dependency type.
      Returns:
      the default properties, never null.