Package org.restlet.engine.resource
Class AnnotationInfo
java.lang.Object
org.restlet.engine.resource.AnnotationInfo
- Direct Known Subclasses:
MethodAnnotationInfo,ThrowableAnnotationInfo
Descriptor for Restlet annotations.
- Author:
- Jerome Louvel
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAnnotationInfo(Class<?> javaClass, Method javaMethod, String annotationValue) Constructor.AnnotationInfo(Class<?> javaClass, String annotationValue) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates if the current variant is equal to the given object.Returns the raw annotation value.protected Class<?>getJavaActualType(Class<?> initialType, Type genericType) Returns the actual type for a given generic type.protected static Class<?>getJavaActualType(Class<?> currentClass, String genericTypeName) Returns the actual type for a given generic type name.protected static Class<?>getJavaActualType(Type currentType, String genericTypeName) Returns the actual type for a given generic type name.Class<?>Returns the resource interface value.Returns the annotated Java method.protected static Class<?>getTypeClass(Type type) Returns the underlying class for a type or null.inthashCode()toString()
-
Field Details
-
annotationValue
The raw annotation value. -
javaClass
The class that hosts the annotated Java method. -
javaMethod
The annotated Java method. -
javaMethodImpl
The upper implementation of the annotated Java method.
-
-
Constructor Details
-
AnnotationInfo
Constructor.- Parameters:
javaClass- The annotated Java class or parent Java class.javaMethod- The annotated Java method.annotationValue- The annotation value.
-
AnnotationInfo
Constructor.- Parameters:
javaClass- The annotated Java class or parent Java class.annotationValue- The annotation value.
-
-
Method Details
-
getJavaActualType
Returns the actual type for a given generic type name.- Parameters:
currentClass- The current class to walk up.genericTypeName- The generic type name to resolve.- Returns:
- The actual type.
-
getJavaActualType
Returns the actual type for a given generic type name.- Parameters:
currentType- The current type to start with.genericTypeName- The generic type name to resolve.- Returns:
- The actual type.
-
getTypeClass
Returns the underlying class for a type or null.- Parameters:
type- The generic type.- Returns:
- The underlying class
-
equals
Indicates if the current variant is equal to the given object. -
getAnnotationValue
Returns the raw annotation value.- Returns:
- The raw annotation value.
-
getJavaActualType
Returns the actual type for a given generic type.- Parameters:
initialType- The initial type, which may be generic.genericType- The generic type information if any.- Returns:
- The actual type.
-
getJavaClass
Returns the resource interface value.- Returns:
- The resource interface value.
-
hashCode
public int hashCode() -
getJavaMethod
Returns the annotated Java method.- Returns:
- The annotated Java method.
-
toString
-