Class AbstractDescriptor<T extends AbstractDescriptor<T>>
java.lang.Object
org.springframework.restdocs.snippet.AbstractDescriptor<T>
- Type Parameters:
T- the type of the descriptor
- Direct Known Subclasses:
HeaderDescriptor,IgnorableDescriptor
Base class for descriptors. Provides the ability to associate arbitrary attributes with
a descriptor.
- Author:
- Andy Wilkinson
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Tattributes(Attributes.Attribute... attributes) Adds the givenattributesto the descriptor.final Tdescription(Object description) Specifies the description.Returns the descriptor's attributes.final ObjectReturns the description.
-
Constructor Details
-
AbstractDescriptor
public AbstractDescriptor()
-
-
Method Details
-
attributes
Adds the givenattributesto the descriptor.- Parameters:
attributes- the attributes- Returns:
- the descriptor
-
description
Specifies the description.- Parameters:
description- the description- Returns:
- the descriptor
-
getDescription
Returns the description.- Returns:
- the description
-
getAttributes
Returns the descriptor's attributes.- Returns:
- the attributes
-