Class AnnotationInfo

java.lang.Object
org.restlet.engine.resource.AnnotationInfo
Direct Known Subclasses:
MethodAnnotationInfo, ThrowableAnnotationInfo

public abstract class AnnotationInfo extends Object
Descriptor for Restlet annotations.
Author:
Jerome Louvel
  • Field Details

    • annotationValue

      protected final String annotationValue
      The raw annotation value.
    • javaClass

      protected final Class<?> javaClass
      The class that hosts the annotated Java method.
    • javaMethod

      protected final Method javaMethod
      The annotated Java method.
    • javaMethodImpl

      protected final Method javaMethodImpl
      The upper implementation of the annotated Java method.
  • Constructor Details

    • AnnotationInfo

      public AnnotationInfo(Class<?> javaClass, Method javaMethod, String annotationValue)
      Constructor.
      Parameters:
      javaClass - The annotated Java class or parent Java class.
      javaMethod - The annotated Java method.
      annotationValue - The annotation value.
    • AnnotationInfo

      public AnnotationInfo(Class<?> javaClass, String annotationValue)
      Constructor.
      Parameters:
      javaClass - The annotated Java class or parent Java class.
      annotationValue - The annotation value.
  • Method Details

    • getJavaActualType

      protected static Class<?> getJavaActualType(Class<?> currentClass, String genericTypeName)
      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

      protected static Class<?> getJavaActualType(Type currentType, String genericTypeName)
      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

      protected static Class<?> getTypeClass(Type type)
      Returns the underlying class for a type or null.
      Parameters:
      type - The generic type.
      Returns:
      The underlying class
    • equals

      public boolean equals(Object other)
      Indicates if the current variant is equal to the given object.
      Overrides:
      equals in class Object
      Parameters:
      other - The other object.
      Returns:
      True if the current object is equal to the given object.
    • getAnnotationValue

      public String getAnnotationValue()
      Returns the raw annotation value.
      Returns:
      The raw annotation value.
    • getJavaActualType

      protected Class<?> getJavaActualType(Class<?> initialType, Type genericType)
      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

      public Class<?> getJavaClass()
      Returns the resource interface value.
      Returns:
      The resource interface value.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getJavaMethod

      public Method getJavaMethod()
      Returns the annotated Java method.
      Returns:
      The annotated Java method.
    • toString

      public String toString()
      Overrides:
      toString in class Object