Class Attributes
java.lang.Object
org.springframework.restdocs.snippet.Attributes
A fluent API for building a map of attributes.
- Author:
- Andy Wilkinson
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
An attribute (key-value pair).static final class
A simple builder for an attribute (key-value pair). -
Method Summary
Modifier and TypeMethodDescriptionattributes
(Attributes.Attribute... attributes) Creates aMap
of the givenattributes
.static Attributes.AttributeBuilder
Creates an attribute with the givenkey
.
-
Method Details
-
key
Creates an attribute with the givenkey
. A value for the attribute must still be specified.- Parameters:
key
- the key of the attribute- Returns:
- an
AttributeBuilder
to use to specify the value of the attribute - See Also:
-
attributes
Creates aMap
of the givenattributes
.- Parameters:
attributes
- the attributes- Returns:
- a Map of the attributes
-