Package org.simpleframework.xml.core
Class DetailExtractor
java.lang.Object
org.simpleframework.xml.core.DetailExtractor
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 Summary
FieldsModifier and TypeFieldDescriptionThis contains a cache of the details scanned for classes.private final Cache
<ContactList> This is the cache of fields for specific classes scanned.private final Cache
<ContactList> This is the cache of methods for specific classes scanned.private final DefaultType
This is an optional access type for the details created.private final Support
This contains various support functions for the details. -
Constructor Summary
ConstructorsConstructorDescriptionDetailExtractor
(Support support) Constructor for theDetailExtractor
object.DetailExtractor
(Support support, DefaultType override) Constructor for theDetailExtractor
object. -
Method Summary
Modifier and TypeMethodDescriptionThis is used to get aDetail
object describing a class and its annotations.This is used to acquire a list ofContact
objects that represent the annotated fields in a type.private ContactList
This is used to acquire a list ofContact
objects that represent the annotated fields in a type.getMethods
(Class type) This is used to acquire a list ofContact
objects that represent the annotated methods in a type.private ContactList
getMethods
(Class type, Detail detail) This is used to acquire a list ofContact
objects that represent the annotated methods in a type.
-
Field Details
-
methods
This is the cache of methods for specific classes scanned. -
fields
This is the cache of fields for specific classes scanned. -
details
This contains a cache of the details scanned for classes. -
override
This is an optional access type for the details created. -
support
This contains various support functions for the details.
-
-
Constructor Details
-
DetailExtractor
Constructor for theDetailExtractor
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
Constructor for theDetailExtractor
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 functionsoverride
- this is the override used for details created
-
-
Method Details
-
getDetail
This is used to get aDetail
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
This is used to acquire a list ofContact
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
This is used to acquire a list ofContact
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
This is used to acquire a list ofContact
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
This is used to acquire a list ofContact
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 methodsdetail
- this is the type to scan for annotated methods- Returns:
- this returns a list of the annotated methods
- Throws:
Exception
-