Lines Matching full:defaults

31 	Defaults []string  member
39 // The optional hook to call after any defaults have been applied.
43 func (d *DefaultableModuleBase) defaults() *defaultsProperties { func
62 // Interface that must be supported by any module to which defaults can be applied.
64 // Get a pointer to the struct containing the Defaults property.
65 defaults() *defaultsProperties methodSpec
67 // Set the property structures into which defaults will be added.
70 // Apply defaults from the supplied Defaults to the property structures supplied to
72 applyDefaults(BottomUpMutatorContext, []Defaults) argument
74 // Set the hook to be called after any defaults have been applied.
98 module.AddProperties(module.defaults())
115 // Controls the visibility of the defaults module itself.
123 // The common pattern for defaults modules is to register separate instances of
128 // contain the values that have been set for the defaults module. Rather, to
132 // d := myModule.(Defaults)
139 // The rationale is that the properties on a defaults module apply to the
140 // defaultable modules using it, not to the defaults module itself. E.g. setting
142 // rather than disabling the defaults module itself.
143 type Defaults interface { interface
147 // DefaultsModuleBase will type-assert to the Defaults interface.
150 // Get the structures containing the properties for which defaults can be provided.
162 Defaults
189 // Add properties that will not have defaults applied to them.
194 // Unlike non-defaults modules the visibility property is not stored in m.base().commonProperties.
199 // The defaults_visibility property controls the visibility of a defaults module so it must be
207 // The applicable licenses property for defaults is 'licenses'.
211 var _ Defaults = (*DefaultsModuleBase)(nil)
214 defaultsList []Defaults) {
216 for _, defaults := range defaultsList {
219 defaultable.applyDefaultVariableProperties(ctx, defaults, prop)
221 defaultable.applyDefaultProperties(ctx, defaults, prop)
228 // property struct may not be identical between the defaults module and the defaultable module.
231 defaults Defaults, defaultableProp interface{}) {
236 defaultsProp := defaults.productVariableProperties()
259 defaults Defaults, defaultableProp interface{}) {
261 for _, def := range defaults.properties() {
277 ctx.BottomUp("defaults", defaultsMutator).UsesCreateModule()
282 ctx.AddDependency(ctx.Module(), DefaultsDepTag, defaultable.defaults().Defaults...)
288 if _, isDefaultsModule := ctx.Module().(Defaults); isDefaultsModule {
289 // Don't squash transitive defaults into defaults modules
292 defaults := defaultable.defaults().Defaults
293 if len(defaults) > 0 {
294 var defaultsList []Defaults
295 seen := make(map[Defaults]bool)
299 if defaults, ok := module.(Defaults); ok {
300 if !seen[defaults] {
301 seen[defaults] = true
302 defaultsList = append(defaultsList, defaults)
303 return len(defaults.defaults().Defaults) > 0
306 ctx.PropertyErrorf("defaults", "module %s is not an defaults module",