Class TaskName

java.lang.Object
dev.nokee.commons.names.TaskName
All Implemented Interfaces:
ElementName, Name, Qualifiable, Comparable<Name>

public final class TaskName extends Object implements ElementName
Represents a task name in Gradle. Task name has three distinct scheme:
  • Method Details

    • getVerb

      public Optional<String> getVerb()
    • withVerb

      public TaskName withVerb(String verb)
    • getObject

      public Optional<String> getObject()
    • withObject

      public TaskName withObject(@Nullable String object)
    • qualifiedBy

      public FullyQualifiedName qualifiedBy(Qualifier qualifier)
      Description copied from interface: ElementName
      Creates a new qualified name for the specified qualifier.
      Specified by:
      qualifiedBy in interface ElementName
      Specified by:
      qualifiedBy in interface Qualifiable
      Parameters:
      qualifier - the qualifier for this name, must not be null
      Returns:
      a new QualifiedName representing the qualifying of this name
    • of

      public static TaskName of(String taskName)
      Returns an TaskName instance where qualifiers are appended to the specified task name. For example:
      • taskNameSomeQualifier
      Parameters:
      taskName - the task name, must not be null
      Returns:
      a qualifiable task name
    • of

      public static TaskName of(String verb, String object)
      Returns an TaskName instance where qualifiers are sandwiched between the specified verb and object (sometime referred as target). For example:
      • verbSomeQualifierObject
      Parameters:
      verb - the verb for the task name, must not be null
      object - the object/target for the task name, must not be null
      Returns:
      a qualifiable task name
    • taskName

      @Deprecated public static String taskName(String verb, String object)
      Deprecated.
      Description copied from interface: ElementName
      Creates a task name for the specified name.
      Parameters:
      verb - the verb (prefix), must not be null
      object - the object (suffix), must not be null
      Returns:
      a qualifiable name instance
    • toString

      public String toString()
    • builder

      public static TaskName.Builder builder()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(String obj)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • propSet

      public Set<String> propSet()
    • with

      public TaskName with(String propName, Object value)
    • get

      public Object get(String propName)