public class AnnotationBasedResourceDescription extends ResolvableResourceDescriptionSupport
ResourceDescription that is customized based on a Description annotation. Allows to fall back on
another ResourceDescription to provide defaults.| Constructor and Description |
|---|
AnnotationBasedResourceDescription(Class<?> type,
ResourceDescription fallback) |
AnnotationBasedResourceDescription(Description description,
ResourceDescription fallback)
Creates a new
AnnotationBasedResourceDescription for the given Description and fallback. |
| Modifier and Type | Method and Description |
|---|---|
String[] |
getCodes() |
String |
getMessage()
Returns the description.
|
org.springframework.http.MediaType |
getType() |
boolean |
isDefault()
Returns whether this is the default description.
|
getArguments, getDefaultMessagepublic AnnotationBasedResourceDescription(Description description, ResourceDescription fallback)
AnnotationBasedResourceDescription for the given Description and fallback.description - must not be null.fallback - must not be null.public AnnotationBasedResourceDescription(Class<?> type, ResourceDescription fallback)
public String[] getCodes()
public String getMessage()
ResourceDescriptionResourceDescription using a MessageSource.public org.springframework.http.MediaType getType()
public boolean isDefault()
ResourceDescriptionCopyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.