|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.engine.resource.AnnotationUtils
public class AnnotationUtils
Utilities to manipulate Restlet annotations.
| Constructor Summary | |
|---|---|
protected |
AnnotationUtils()
Protected constructor. |
| Method Summary | |
|---|---|
void |
clearCache()
Clears the annotation descriptors cache. |
AnnotationInfo |
getAnnotation(List<AnnotationInfo> annotations,
Method javaMethod)
Returns the first annotation descriptor matching the given Java method. |
AnnotationInfo |
getAnnotation(List<AnnotationInfo> annotations,
Method restletMethod,
Form query,
Representation entity,
MetadataService metadataService,
ConverterService converterService)
Returns the first annotation descriptor matching the given Restlet method. |
List<AnnotationInfo> |
getAnnotations(Class<?> clazz)
Returns the annotation descriptors for the given resource class. |
List<AnnotationInfo> |
getAnnotations(Class<?> clazz,
Method javaMethod)
Returns the annotation descriptors for the given resource class. |
static AnnotationUtils |
getInstance()
Returns the current instance of AnnotationUtils. |
protected Method |
getRestletMethod(Annotation annotation,
Annotation methodAnnotation)
Returns an instance of Method according to the given annotations. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AnnotationUtils()
| Method Detail |
|---|
public static AnnotationUtils getInstance()
public void clearCache()
public AnnotationInfo getAnnotation(List<AnnotationInfo> annotations,
Method javaMethod)
annotations - The list of annotations.javaMethod - The method to match.
public AnnotationInfo getAnnotation(List<AnnotationInfo> annotations,
Method restletMethod,
Form query,
Representation entity,
MetadataService metadataService,
ConverterService converterService)
throws IOException
annotations - The list of annotations.restletMethod - The method to match.query - The query parameters.entity - The request entity to match or null if no entity is provided.metadataService - The metadata service to use.converterService - The converter service to use.
IOExceptionpublic List<AnnotationInfo> getAnnotations(Class<?> clazz)
clazz - The resource class to introspect.
public List<AnnotationInfo> getAnnotations(Class<?> clazz,
Method javaMethod)
javaMethod - The Java method.
protected Method getRestletMethod(Annotation annotation,
Annotation methodAnnotation)
Method according to the given annotations.
annotation - Java annotation.methodAnnotation - Annotation that corresponds to a Restlet method.
Method according to the given annotations.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||