Interface ElementName

All Superinterfaces:
Comparable<Name>, Name, Qualifiable
All Known Subinterfaces:
OtherName
All Known Implementing Classes:
ConfigurationName, TaskName

public interface ElementName extends Qualifiable, Name
Represents an element name of a domain object, typically non-qualified. Those names are non-unique across all domain objects of a project. For example, the element name of a task that assemble the output of a component is assemble. Its fully qualified name may be assembleTestDebug for the debug binary of the test component.

In some cases, the element name may be the same as the fully qualified name such as the assemble task of the main component. However, it's best to qualify the task name with the appropriate qualifier as both the element name and fully qualified name represent different things. For example: ElementName.taskName('assemble') vs Names.ofMain().taskName('assemble').

Some element names may participate in further qualification, i.e. CppBinary, while other won't, i.e. Task name or Configuration name, or AdhocComponentWithVariants name.

See Also:
  • Method Details

    • ofMain

      static OtherName ofMain(String name)
      Creates a main element name for the specified name usable as a qualifier.
      Parameters:
      name - the name, must not be null
      Returns:
      a qualifying name instance
    • of

      static OtherName of(String name)
      Creates a non-main element name for the specified name usable as a qualifier.
      Parameters:
      name - the name, must not be null
      Returns:
      a qualifying name instance
    • taskName

      static TaskName taskName(String verb)
      Creates a task name for the specified name.
      Parameters:
      verb - the verb (prefix), must not be null
      Returns:
      a qualifiable name instance
    • taskName

      static TaskName taskName(String verb, String object)
      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
    • taskName

      static TaskName.Builder taskName()
      Returns a builder to create complex task name.
      Returns:
      a task name builder
      See Also:
    • configurationName

      static ConfigurationName configurationName(String name)
      Creates a configuration name prefixing qualifier (standard) for the specified name.
      Parameters:
      name - the name, must not be null
      Returns:
      a configuration name instance
    • configurationName

      static ConfigurationName.Builder configurationName()
      Returns a builder to create non-standard configuration name.
      Returns:
      a configuration name builder
      See Also:
    • componentName

      static ElementName componentName(String name)
      Creates a software component name suffixing qualifier (standard) for the specified name.
      Parameters:
      name - the name, must not be null
      Returns:
      an element name instance
    • qualifiedBy

      FullyQualifiedName qualifiedBy(Qualifier qualifier)
      Creates a new qualified name for the specified qualifier.
      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