Class DetailExtractor

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

class DetailExtractor extends Object
The DetailExtractor object is used to extract details for a specific class. All details extracted are cached so that they can be reused when requested several times. This provides an increase in performance when there are large class hierarchies as annotations does not need to be scanned a second time.
See Also:
  • Field Details

    • methods

      private final Cache<ContactList> methods
      This is the cache of methods for specific classes scanned.
    • fields

      private final Cache<ContactList> fields
      This is the cache of fields for specific classes scanned.
    • details

      private final Cache<Detail> details
      This contains a cache of the details scanned for classes.
    • override

      private final DefaultType override
      This is an optional access type for the details created.
    • support

      private final Support support
      This contains various support functions for the details.
  • Constructor Details

    • DetailExtractor

      public DetailExtractor(Support support)
      Constructor for the DetailExtractor object. This is used to extract various details for a class, such as the method and field details as well as the annotations used on the class. The primary purpose for this is to create cachable values that reduce the amount of reflection required.
      Parameters:
      support - this contains various support functions
    • DetailExtractor

      public DetailExtractor(Support support, DefaultType override)
      Constructor for the DetailExtractor object. This is used to extract various details for a class, such as the method and field details as well as the annotations used on the class. The primary purpose for this is to create cachable values that reduce the amount of reflection required.
      Parameters:
      support - this contains various support functions
      override - this is the override used for details created
  • Method Details

    • getDetail

      public Detail getDetail(Class type)
      This is used to get a Detail object describing a class and its annotations. Any detail retrieved from this will be cached to increase the performance of future accesses.
      Parameters:
      type - this is the type to acquire the detail for
      Returns:
      an object describing the type and its annotations
    • getFields

      public ContactList getFields(Class type) throws Exception
      This is used to acquire a list of Contact objects that represent the annotated fields in a type. The entire class hierarchy is scanned for annotated fields. Caching of the contact list is done to increase performance.
      Parameters:
      type - this is the type to scan for annotated fields
      Returns:
      this returns a list of the annotated fields
      Throws:
      Exception
    • getFields

      private ContactList getFields(Class type, Detail detail) throws Exception
      This is used to acquire a list of Contact objects that represent the annotated fields in a type. The entire class hierarchy is scanned for annotated fields. Caching of the contact list is done to increase performance.
      Parameters:
      detail - this is the detail to scan for annotated fields
      Returns:
      this returns a list of the annotated fields
      Throws:
      Exception
    • getMethods

      public ContactList getMethods(Class type) throws Exception
      This is used to acquire a list of Contact objects that represent the annotated methods in a type. The entire class hierarchy is scanned for annotated methods. Caching of the contact list is done to increase performance.
      Parameters:
      type - this is the type to scan for annotated methods
      Returns:
      this returns a list of the annotated methods
      Throws:
      Exception
    • getMethods

      private ContactList getMethods(Class type, Detail detail) throws Exception
      This is used to acquire a list of Contact objects that represent the annotated methods in a type. The entire class hierarchy is scanned for annotated methods. Caching of the contact list is done to increase performance.
      Parameters:
      type - this is the type to scan for annotated methods
      detail - this is the type to scan for annotated methods
      Returns:
      this returns a list of the annotated methods
      Throws:
      Exception