public class AnnotationInfo
extends java.lang.Object
Constructor and Description |
---|
AnnotationInfo(java.lang.Class<?> resourceClass,
Method restletMethod,
java.lang.reflect.Method javaMethod,
java.lang.String value)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other)
Indicates if the current variant is equal to the given variant.
|
java.lang.String |
getInputValue()
Returns the input part of the annotation value.
|
java.lang.Class<?> |
getJavaInputType(int index)
Returns the generic type for the given input parameter.
|
java.lang.Class<?>[] |
getJavaInputTypes()
Returns the input types of the Java method.
|
java.lang.reflect.Method |
getJavaMethod()
Returns the annotated Java method.
|
java.lang.Class<?> |
getJavaOutputType()
Returns the output type of the Java method.
|
java.lang.String |
getOutputValue()
Returns the output part of the annotation value.
|
java.util.List<Variant> |
getRequestVariants(MetadataService metadataService,
ConverterService converterService)
Returns a list of request variants based on the annotation value.
|
java.lang.Class<?> |
getResourceClass()
Returns the resource interface value.
|
java.util.List<Variant> |
getResponseVariants(MetadataService metadataService,
ConverterService converterService)
Returns a list of response variants based on the annotation value.
|
Method |
getRestletMethod()
Returns the matching Restlet method.
|
java.lang.String |
getValue()
Returns the annotation value.
|
boolean |
isCompatible(Method restletMethod,
Representation requestEntity,
MetadataService metadataService,
ConverterService converterService)
Indicates if the annotated method described is compatible with the given
parameters.
|
boolean |
isCompatibleRequestEntity(Representation requestEntity,
MetadataService metadataService,
ConverterService converterService)
Indicates if the given request entity is compatible with the annotated
method described.
|
java.lang.String |
toString() |
public AnnotationInfo(java.lang.Class<?> resourceClass, Method restletMethod, java.lang.reflect.Method javaMethod, java.lang.String value)
resourceClass
- The class or interface that hosts the annotated Java method.restletMethod
- The matching Restlet method.javaMethod
- The annotated Java method.value
- The annotation value.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- The other variant.public java.lang.String getInputValue()
public java.lang.Class<?> getJavaInputType(int index)
index
- The input parameter index.public java.lang.Class<?>[] getJavaInputTypes()
public java.lang.reflect.Method getJavaMethod()
public java.lang.Class<?> getJavaOutputType()
public java.lang.String getOutputValue()
public java.util.List<Variant> getRequestVariants(MetadataService metadataService, ConverterService converterService)
metadataService
- The metadata service to use.public java.lang.Class<?> getResourceClass()
public java.util.List<Variant> getResponseVariants(MetadataService metadataService, ConverterService converterService)
metadataService
- The metadata service to use.converterService
- The converter service to use.public Method getRestletMethod()
public java.lang.String getValue()
public boolean isCompatible(Method restletMethod, Representation requestEntity, MetadataService metadataService, ConverterService converterService)
restletMethod
- The Restlet method to match.requestEntity
- Optional request entity.metadataService
- The metadata service to use.converterService
- The converter service to use.public boolean isCompatibleRequestEntity(Representation requestEntity, MetadataService metadataService, ConverterService converterService)
requestEntity
- Optional request entity.metadataService
- The metadata service to use.converterService
- The converter service to use.public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2005-2012. All Rights Reserved.