Package dev.nokee.commons.names
Interface ElementName
- All Superinterfaces:
Comparable<Name>,Name,Qualifiable
- All Known Subinterfaces:
OtherName
- All Known Implementing Classes:
ConfigurationName,TaskName
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.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ElementNamecomponentName(String name) Creates a software component name suffixing qualifier (standard) for the specified name.static ConfigurationName.BuilderReturns a builder to create non-standard configuration name.static ConfigurationNameconfigurationName(String name) Creates a configuration name prefixing qualifier (standard) for the specified name.static OtherNameCreates a non-main element name for the specified name usable as a qualifier.static OtherNameCreates a main element name for the specified name usable as a qualifier.qualifiedBy(Qualifier qualifier) Creates a new qualified name for the specified qualifier.static TaskName.BuildertaskName()Returns a builder to create complex task name.static TaskNameCreates a task name for the specified name.static TaskNameCreates a task name for the specified name.
-
Method Details
-
ofMain
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
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
Creates a task name for the specified name.- Parameters:
verb- the verb (prefix), must not be null- Returns:
- a qualifiable name instance
-
taskName
Creates a task name for the specified name.- Parameters:
verb- the verb (prefix), must not be nullobject- the object (suffix), must not be null- Returns:
- a qualifiable name instance
-
taskName
Returns a builder to create complex task name.- Returns:
- a task name builder
- See Also:
-
configurationName
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
Returns a builder to create non-standard configuration name.- Returns:
- a configuration name builder
- See Also:
-
componentName
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
Creates a new qualified name for the specified qualifier.- Specified by:
qualifiedByin interfaceQualifiable- Parameters:
qualifier- the qualifier for this name, must not be null- Returns:
- a new
QualifiedNamerepresenting the qualifying of this name
-