Package org.simpleframework.xml.convert
Class ScannerBuilder
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.concurrent.ConcurrentHashMap<java.lang.Object,T>
-
- org.simpleframework.xml.util.ConcurrentCache<Scanner>
-
- org.simpleframework.xml.convert.ScannerBuilder
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.concurrent.ConcurrentMap<java.lang.Object,Scanner>
,java.util.Map<java.lang.Object,Scanner>
,Cache<Scanner>
class ScannerBuilder extends ConcurrentCache<Scanner>
TheScannerBuilder
is used to build and cache each scanner requested. Building and caching scanners ensures that annotations can be acquired from a class quickly as a scan only needs to be performed once. Each scanner built scans the class provided as well as all the classes in the hierarchy.- See Also:
ConverterScanner
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ScannerBuilder.Entry
TheEntry
object represents a scanner that is used to scan a specified type for annotations.
-
Constructor Summary
Constructors Constructor Description ScannerBuilder()
Constructor for theScannerBuilder
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Scanner
build(java.lang.Class<?> type)
This is used to buildScanner
objects that are used to scan the provided class for annotations.-
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
-
-
-
-
Method Detail
-
build
public Scanner build(java.lang.Class<?> type)
This is used to buildScanner
objects that are used to scan the provided class for annotations. Each scanner instance is cached once created to ensure it does not need to be built twice, which improves the performance.- Parameters:
type
- this is the type to build a scanner object for- Returns:
- this will return a scanner instance for the given type
-
-