Class Features

All Implemented Interfaces:
Serializable, Cloneable, Iterable<String>, Collection<String>, List<String>, RandomAccess

public class Features extends ArrayList<String>
Features container.
See Also:
  • Constructor Details

  • Method Details

    • hasFeature

      public boolean hasFeature(Class<?> clazz)
      Parameters:
      clazz - Feature Class
      Returns:
      Whether the feature is present
    • hasMultiProjectFeature

      public boolean hasMultiProjectFeature()
      Returns:
      Whether the project has a multi-project feature
    • buildTools

      public List<BuildTool> buildTools()
      Returns:
      The BuildTool
    • application

      public ApplicationFeature application()
      Returns:
      The Application Feature
    • language

      public LanguageFeature language()
      Returns:
      The Language
    • testFramework

      public TestFeature testFramework()
      Returns:
      The Test Feature
    • getFeatures

      public Set<Feature> getFeatures()
      Returns:
      The Features
    • javaVersion

      public JdkVersion javaVersion()
      Returns:
      The Java version
    • mainClass

      public Optional<String> mainClass()
      Returns:
      The main class
    • isFeaturePresent

      public boolean isFeaturePresent(Class<? extends Feature> feature)
      Parameters:
      feature - Feature
      Returns:
      Whether the feature is present
    • getFeature

      public <T extends Feature> Optional<T> getFeature(Class<T> feature)
      Type Parameters:
      T - feature Type
      Parameters:
      feature - Feature
      Returns:
      The feature if present
    • getRequiredFeature

      public <T extends Feature> T getRequiredFeature(Class<T> feature)
      Type Parameters:
      T - feature Type
      Parameters:
      feature - The feature class
      Returns:
      The feature if present
      Throws:
      IllegalStateException - if the feature is not present