Class MethodDetail


  • class MethodDetail
    extends java.lang.Object
    The MethodDetail represents a method and acts as a means to cache all of the details associated with the method. This is primarily used to cache data associated with the method as some platforms do not perform well with reflection.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.annotation.Annotation[] list
      This contains all the annotations declared on the method.
      private java.lang.reflect.Method method
      This is the method that this instance is representing.
      private java.lang.String name
      This contains the name of the method that is represented.
    • Constructor Summary

      Constructors 
      Constructor Description
      MethodDetail​(java.lang.reflect.Method method)
      Constructor for the MethodDetail object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.annotation.Annotation[] getAnnotations()
      This returns the list of annotations that are associated with the method.
      java.lang.reflect.Method getMethod()
      This is the method that is represented by this detail.
      java.lang.String getName()
      This is used to extract the name of the method.
      • Methods inherited from class java.lang.Object

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

      • list

        private final java.lang.annotation.Annotation[] list
        This contains all the annotations declared on the method.
      • method

        private final java.lang.reflect.Method method
        This is the method that this instance is representing.
      • name

        private final java.lang.String name
        This contains the name of the method that is represented.
    • Constructor Detail

      • MethodDetail

        public MethodDetail​(java.lang.reflect.Method method)
        Constructor for the MethodDetail object. This takes a method that has been extracted from a class. All of the details such as the annotations and the method name are stored.
        Parameters:
        method - this is the method that is represented by this
    • Method Detail

      • getAnnotations

        public java.lang.annotation.Annotation[] getAnnotations()
        This returns the list of annotations that are associated with the method. The annotations are extracted only once and cached internally, which improves the performance of serialization as reflection on the method needs to be performed only once.
        Returns:
        this returns the annotations associated with the method
      • getMethod

        public java.lang.reflect.Method getMethod()
        This is the method that is represented by this detail. The method is provided so that it can be invoked to set or get the data that is referenced by the method during serialization.
        Returns:
        this returns the method represented by this detail
      • getName

        public java.lang.String getName()
        This is used to extract the name of the method. The name here is the actual name of the method rather than the name used by the XML representation of the method.
        Returns:
        this returns the actual name of the method