blob: e722512e27273c46be5e487d30a2fbfcff7b90c3 [file]
---
title: 'fragments'
---
A collection of configuration fragments available in the current rule implementation context. Access a specific fragment by its field name. For example, `ctx.fragments.java`
Only configuration fragments which are declared in the rule definition may be accessed in this collection.
See the [configuration fragment reference](/versions/8.4.2/rules/lib/fragments) for a list of available fragments and the [rules documentation](https://bazel.build/versions/8.4.2/extending/rules#configuration_fragments) for how to use them.