Class Introspection.Accessors

  • Enclosing class:
    Introspection

    public static final class Introspection.Accessors
    extends java.lang.Object
    This class contains the instances of getter and setter for a specific resource
    • Method Summary

      Modifier and Type Method Description
      <A extends java.lang.annotation.Annotation>
      A
      getAnnotation​(java.lang.Class<? extends A> annotationClass)
      Returns the instance of the annotation class associated to the accessor method, or null if the annotation doesn't exist.
      <A extends java.lang.annotation.Annotation>
      java.util.List<A>
      getAnnotations​(java.lang.Class<? extends A> annotationClass)
      Returns the list of the annotation instances associated to the invoker, or null if the annotation class is not present into the invoker.
      java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,​java.util.List<java.lang.annotation.Annotation>> getAnnotationsMap()
      Return an unmodifiable map with all the annotation instances associated to the method indexed by the class of the each annotation instance.
      Introspection.Getter getGetter()
      Returns the getter instance.
      java.lang.String getResourceName()
      Returns the name of the resource.
      Introspection.Setter getSetter()
      Returns the setter instance.
      boolean isAnnotationPresent​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
      Verify if exists an instance of the annotation class associated to the accessor method.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getResourceName

        public java.lang.String getResourceName()
        Returns the name of the resource.
        Returns:
        Resource name.
      • getGetter

        public Introspection.Getter getGetter()
        Returns the getter instance.
        Returns:
        Getter instance.
      • getSetter

        public Introspection.Setter getSetter()
        Returns the setter instance.
        Returns:
        Setter instance.
      • isAnnotationPresent

        public boolean isAnnotationPresent​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
        Verify if exists an instance of the annotation class associated to the accessor method.
        Parameters:
        annotationClass - Annotation class.
        Returns:
        True if the instance exists and false in the otherwise
      • getAnnotation

        public final <A extends java.lang.annotation.Annotation> A getAnnotation​(java.lang.Class<? extends A> annotationClass)
        Returns the instance of the annotation class associated to the accessor method, or null if the annotation doesn't exist. This method return the first instance of the list of annotations.
        Type Parameters:
        A - Expected annotation type.
        Parameters:
        annotationClass - Annotation class.
        Returns:
        Annotation instance or null.
      • getAnnotations

        public final <A extends java.lang.annotation.Annotation> java.util.List<A> getAnnotations​(java.lang.Class<? extends A> annotationClass)
        Returns the list of the annotation instances associated to the invoker, or null if the annotation class is not present into the invoker.
        Type Parameters:
        A - Expected annotation type.
        Parameters:
        annotationClass - Annotation class.
        Returns:
        Unmodifiable list of annotation instances.
      • getAnnotationsMap

        public final java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,​java.util.List<java.lang.annotation.Annotation>> getAnnotationsMap()
        Return an unmodifiable map with all the annotation instances associated to the method indexed by the class of the each annotation instance.
        Returns:
        Unmodifiable map.