# Package org.springframework.util

@NonNullApi @NonNullFields package org.springframework.util
Miscellaneous utility classes, such as utilities for working with strings, classes, collections, reflection, etc.

Related Packages
Package
Description
org.springframework.util.backoff
A generic back-off abstraction.
org.springframework.util.comparator
Useful generic `java.util.Comparator` implementations, such as an invertible comparator and a compound comparator.
org.springframework.util.concurrent
Useful generic `java.util.concurrent.Future` extensions.
org.springframework.util.function
Useful generic `java.util.function` helper classes.
org.springframework.util.unit
Useful unit data types.
org.springframework.util.xml
Miscellaneous utility classes for XML parsing and transformation, such as error handlers that log warnings via Commons Logging.
Class
Description
AlternativeJdkIdGenerator
An `IdGenerator` that uses `SecureRandom` for the initial seed and `Random` thereafter, instead of calling `UUID.randomUUID()` every time as `JdkIdGenerator` does.
AntPathMatcher
`PathMatcher` implementation for Ant-style path patterns.
AntPathMatcher.AntPathStringMatcher
Tests whether a string matches against a pattern via a `Pattern`.
AntPathMatcher.AntPatternComparator
The default `Comparator` implementation returned by `AntPathMatcher.getPatternComparator(String)`.
Assert
Assertion utility class that assists in validating arguments.
AutoPopulatingList<E>
Simple `List` wrapper class that allows for elements to be automatically populated as they are requested.
AutoPopulatingList.ElementFactory<E>
Factory interface for creating elements for an index-based access data structure such as a `List`.
AutoPopulatingList.ElementInstantiationException
Exception to be thrown from ElementFactory.
ClassUtils
Miscellaneous `java.lang.Class` utility methods.
CollectionUtils
Miscellaneous collection utility methods.
CommonsLogWriter
`java.io.Writer` adapter for a Commons Logging `Log`.
CompositeIterator<E>
Composite iterator that combines multiple other iterators, as registered via `CompositeIterator.add(Iterator)`.
ConcurrencyThrottleSupport
Support class for throttling concurrent access to a specific resource.
ConcurrentLruCache<K,V>
Simple LRU (Least Recently Used) cache, bounded by a specified cache capacity.
ConcurrentReferenceHashMap<K,V>
A `ConcurrentHashMap` that uses `soft` or weak references for both `keys` and `values`.
ConcurrentReferenceHashMap.Entry<K,V>
A single map entry.
ConcurrentReferenceHashMap.Reference<K,V>
A reference to an `ConcurrentReferenceHashMap.Entry` contained in the map.
ConcurrentReferenceHashMap.ReferenceType
Various reference types supported by this map.
ConcurrentReferenceHashMap.Restructure
The types of restructuring that can be performed.
CustomizableThreadCreator
Simple customizable helper class for creating new `Thread` instances.
DefaultPropertiesPersister
Default implementation of the `PropertiesPersister` interface.
DigestUtils
Miscellaneous methods for calculating digests.
ErrorHandler
A strategy for handling errors.
ExceptionTypeFilter
An `InstanceFilter` implementation that handles exception types.
FastByteArrayOutputStream
A speedy alternative to `ByteArrayOutputStream`.
FileCopyUtils
Simple utility methods for file and stream copying.
FileSystemUtils
Utility methods for working with the file system.
IdGenerator
Contract for generating universally unique identifiers (`UUIDs`).
InstanceFilter<T>
A simple instance filter that checks if a given instance match based on a collection of includes and excludes element.
InvalidMimeTypeException
Exception thrown from `MimeTypeUtils.parseMimeType(String)` in case of encountering an invalid content type specification String.
JdkIdGenerator
An `IdGenerator` that calls `UUID.randomUUID()`.
LinkedCaseInsensitiveMap<V>
`LinkedHashMap` variant that stores String keys in a case-insensitive manner, for example for key-based access in a results table.
LinkedMultiValueMap<K,V>
Simple implementation of `MultiValueMap` that wraps a `LinkedHashMap`, storing multiple values in an `ArrayList`.
MethodInvoker
Helper class that allows for specifying a method to invoke in a declarative fashion, be it static or non-static.
MimeType
Represents a MIME Type, as originally defined in RFC 2046 and subsequently used in other Internet protocols including HTTP.
MimeType.SpecificityComparator<T extends MimeType>
Deprecated, for removal: This API element is subject to removal in a future version.
As of 6.0, with no direct replacement
MimeTypeUtils
Miscellaneous `MimeType` utility methods.
MultiValueMap<K,V>
Extension of the `Map` interface that stores multiple values.
MultiValueMapAdapter<K,V>
Adapts a given `Map` to the `MultiValueMap` contract.
NumberUtils
Miscellaneous utility methods for number conversion and parsing.
ObjectUtils
Miscellaneous object utility methods.
PathMatcher
Strategy interface for `String`-based path matching.
PatternMatchUtils
Utility methods for simple pattern matching, in particular for Spring's typical `xxx*`, `*xxx`, `*xxx*`, and `xxx*yyy` pattern styles.
PlaceholderResolutionException
Thrown when the resolution of placeholder failed.
PropertiesPersister
Strategy interface for persisting `java.util.Properties`, allowing for pluggable parsing strategies.
PropertyPlaceholderHelper
Utility class for working with Strings that have placeholder values in them.
PropertyPlaceholderHelper.PlaceholderResolver
Strategy interface used to resolve replacement values for placeholders contained in Strings.
ReflectionUtils
Simple utility class for working with the reflection API and handling reflection exceptions.
ReflectionUtils.FieldCallback
Callback interface invoked on each field in the hierarchy.
ReflectionUtils.FieldFilter
Callback optionally used to filter fields to be operated on by a field callback.
ReflectionUtils.MethodCallback
Action to take on each method.
ReflectionUtils.MethodFilter
Callback optionally used to filter methods to be operated on by a method callback.
ResizableByteArrayOutputStream
An extension of `ByteArrayOutputStream` that: has public `ResizableByteArrayOutputStream.grow(int)` and `ResizableByteArrayOutputStream.resize(int)` methods to get more control over the size of the internal buffer has a higher initial capacity (256) by default
ResourceUtils
Utility methods for resolving resource locations to files in the file system.
RouteMatcher
Contract for matching routes to patterns.
RouteMatcher.Route
A parsed representation of a route.
SerializationUtils
Static utilities for serialization and deserialization using Java Object Serialization.
SimpleIdGenerator
A simple `IdGenerator` that starts at 1, increments up to `Long.MAX_VALUE`, and then rolls over.
SimpleRouteMatcher
`RouteMatcher` that delegates to a `PathMatcher`.
StopWatch
Simple stop watch, allowing for timing of a number of tasks, exposing total running time and running time for each named task.
StopWatch.TaskInfo
Nested class to hold data about one task executed within the `StopWatch`.
StreamUtils
Simple utility methods for dealing with streams.
StringUtils
Miscellaneous `String` utility methods.
StringValueResolver
Simple strategy interface for resolving a String value.
SystemPropertyUtils
Helper class for resolving placeholders in texts.
TypeUtils
Utility to work with generic type parameters.