api / org.gradle.model / ModelElement

ModelElement

@Incubating interface ModelElement : Named

Represents an element in a model. Elements are arranged in a hierarchy.

Functions

getDisplayName

abstract fun getDisplayName(): String

Returns a human-consumable display name for this element.

getName

abstract fun getName(): String

Returns the name of this element. Each element has a name associated with it, that uniquely identifies the element amongst its siblings. Some element have their name generated or automatically assigned, and for these elements the name may not be human consumable.

Inheritors

ComponentSpec

interface ComponentSpec : ModelElement

A software component that is built by Gradle.

ModelMap

interface ModelMap<T : Any> : MutableIterable<T>, ModelElement

Model backed map like structure allowing adding of items where instantiation is managed.

org.gradle.model.Managed types may declare model map properties. Model maps can only contain managed types.

ModelSet

interface ModelSet<T : Any> : MutableSet<T>, ModelElement

A set of managed model objects.

org.gradle.model.Managed types may declare managed set properties. Managed sets can only contain managed types.

Managed set objects cannot be mutated via the mutative methods of the java.util.Set interface (e.g. java.util.Set#add(Object), java.util.Set#clear()). To add elements to the set, the #create(Action) method can be used.

VariantComponent

interface VariantComponent : ModelElement

A component that has one or more mutually exclusive variants.