Package org.simpleframework.xml.convert
Class ScannerBuilder.Entry
java.lang.Object
java.util.AbstractMap<Object,Annotation>
java.util.concurrent.ConcurrentHashMap<Object,Annotation>
org.simpleframework.xml.util.ConcurrentCache<Annotation>
org.simpleframework.xml.convert.ScannerBuilder.Entry
- All Implemented Interfaces:
Serializable
,ConcurrentMap<Object,
,Annotation> Map<Object,
,Annotation> Scanner
,Cache<Annotation>
- Enclosing class:
ScannerBuilder
The
Entry
object represents a scanner that is
used to scan a specified type for annotations. All annotations
scanned from the type are cached so that they do not need to
be looked up twice. This ensures scanning is much quicker.-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ConcurrentHashMap
ConcurrentHashMap.KeySetView<K,
V> Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate <T extends Annotation>
TThis method will scan a class for the specified annotation.<T extends Annotation>
TThis method will scan a class for the specified annotation.Methods inherited from class org.simpleframework.xml.util.ConcurrentCache
cache, contains, fetch, take
Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, values
Methods inherited from class java.util.AbstractMap
clone
-
Field Details
-
root
This class is the subject for all annotation scans performed.
-
-
Constructor Details
-
Entry
Constructor for theEntry
object is used to create a scanner that will scan the specified type. All annotations that are scanned are cached to ensure that they do not need to be looked up twice. This ensures that scans are quicker including ones that result in null.- Parameters:
root
- this is the root class that is to be scanned
-
-
Method Details
-
scan
This method will scan a class for the specified annotation. If the annotation is found on the class, or on one of the super types then it is returned. All scans will be cached to ensure scanning is only performed once. -
find
This method will scan a class for the specified annotation. If the annotation is found on the class, or on one of the super types then it is returned. All scans will be cached to ensure scanning is only performed once.- Parameters:
label
- this is the annotation type to be scanned for- Returns:
- this will return the annotation if it is found
-