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(@Nullable Object description) Specifies the description.Returns the descriptor's attributes.final @Nullable ObjectReturns the description.
-
Constructor Details
-
AbstractDescriptor
public AbstractDescriptor()
-
-
Method Details
-
attributes
Adds the givenattributesto the descriptor.- Parameters:
attributes- the attributes- Returns:
- the descriptor
-
description
-
getDescription
-
getAttributes
-