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.
|
MediaType |
getType() |
boolean |
isDefault()
Returns whether this is the default description.
|
getArguments, getDefaultMessage
public 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()
ResourceDescription
ResourceDescription
using a MessageSource
.public MediaType getType()
public boolean isDefault()
ResourceDescription
Copyright © 2011-2015–2016 Pivotal Software, Inc.. All rights reserved.