Class MethodDetail

java.lang.Object
org.simpleframework.xml.core.MethodDetail

class MethodDetail extends 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 Details

    • list

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

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

      private final String name
      This contains the name of the method that is represented.
  • Constructor Details

    • MethodDetail

      public MethodDetail(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 Details

    • getAnnotations

      public 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 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 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