# Package-level declarations

Classes that operate upon the Gradle model.

## Types

ConfigurationCycleException
Link copied to clipboard
@Incubating
open class ConfigurationCycleException : GradleException
Thrown when a cycle is encountered while configuring a model element.
Defaults
Link copied to clipboard
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.METHOD)
@Incubating
annotation class Defaults
Denotes that the RuleSource method rule carrying this annotation initializes the rule subject with default values.
Each
Link copied to clipboard
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.PARAMETER)
@Incubating
annotation class Each
Signals that a RuleSource rule should be applied to all matching descendant elements of the scope instead of the scope itself.
Finalize
Link copied to clipboard
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.METHOD)
@Incubating
annotation class Finalize
Denotes that the RuleSource method rule carrying this annotation finalizes the rule subject.
InvalidModelRuleDeclarationException
Link copied to clipboard
@Incubating
open class InvalidModelRuleDeclarationException : GradleException
Thrown when a model rule, or source of model rules, is declared in an invalid way.
InvalidModelRuleException
Link copied to clipboard
@Incubating
open class InvalidModelRuleException : GradleException
Thrown when there is a problem with the usage of a model rule.
Managed
Link copied to clipboard
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.TYPE)
@Incubating
annotation class Managed
A managed type is transparent to the model space, and enforces immutability at the appropriate times in the object's lifecycle.
Model
Link copied to clipboard
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.METHOD)
@Incubating
annotation class Model
Denotes that the RuleSource method rule carrying this annotation creates a new top level element in the model space.
ModelElement
Link copied to clipboard
@Incubating
interface ModelElement : Named
Represents an element in a model.
ModelMap
Link copied to clipboard
@Incubating
interface ModelMap<T> : Iterable<T> , ModelElement
Model backed map like structure allowing adding of items where instantiation is managed.
ModelRuleBindingException
Link copied to clipboard
@Incubating
open class ModelRuleBindingException : GradleException
Thrown when there is a problem binding the model element references of a model rule.
ModelSet
Link copied to clipboard
@Incubating
interface ModelSet<T> : Set<T> , ModelElement
A set of managed model objects.
ModelViewClosedException
Link copied to clipboard
@Incubating
open class ModelViewClosedException : ReadOnlyModelViewException
Thrown when at attempt is made to mutate a subject of a rule after the rule has completed.
Mutate
Link copied to clipboard
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.METHOD)
@Incubating
annotation class Mutate
Denotes that the RuleSource method rule carrying this annotation mutates the rule subject.
Path
Link copied to clipboard
@Target(value = [ElementType.PARAMETER])
@Retention(value = RetentionPolicy.RUNTIME)
@Incubating
annotation class Path
Specifies a model path on a parameter
ReadOnlyModelViewException
Link copied to clipboard
@Incubating
open class ReadOnlyModelViewException : GradleException
Thrown when an attempt is made to change the value of a model element that is not writable at the time.
RuleInput
Link copied to clipboard
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.METHOD)
@Incubating
annotation class RuleInput
Attached to the getter for a property on a RuleSource to denote that the property defines an implicit input for all rules defined by the rule source.
Rules
Link copied to clipboard
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.METHOD)
@Incubating
annotation class Rules
Denotes that the RuleSource method rule carrying this annotation defines additional rules based on its inputs.
RuleSource
Link copied to clipboard
@Incubating
open class RuleSource
A marker type for a class that is a collection of rules.
RuleTarget
Link copied to clipboard
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.METHOD)
@Incubating
annotation class RuleTarget
Attached to the getter for a property on a RuleSource to denote that the property defines the target for the rule source.
Unmanaged
Link copied to clipboard
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.METHOD)
@Incubating
annotation class Unmanaged
Indicates that a property of a managed model element is explicitly of an unmanaged type.
Validate
Link copied to clipboard
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.METHOD)
@Incubating
annotation class Validate
Denotes that the RuleSource method rule carrying this annotation validates the rule subject.
WriteOnlyModelViewException
Link copied to clipboard
@Incubating
open class WriteOnlyModelViewException : GradleException
Thrown when an attempt is made to read the value of a model element that is not readable at the time.