# Uses of Annotation Interface
org.springframework.lang.Contract

Packages that use Contract
Package
Description
org.springframework.core.annotation
Core support package for annotations, meta-annotations, and merged annotations with attribute overrides.
org.springframework.core.convert
Type conversion system API.
org.springframework.util
Miscellaneous utility classes, such as utilities for working with strings, classes, collections, reflection, etc.

## Uses of Contract in org.springframework.core.annotation

Methods in org.springframework.core.annotation with annotations of type Contract
Modifier and Type
Method
Description
`boolean`
RepeatableContainers.`equals(Object other)`

## Uses of Contract in org.springframework.core.convert

Methods in org.springframework.core.convert with annotations of type Contract
Modifier and Type
Method
Description
`static TypeDescriptor`
TypeDescriptor.`array(TypeDescriptor elementTypeDescriptor)`
Create a new type descriptor as an array of the specified type.
`static TypeDescriptor`
TypeDescriptor.`forObject(Object source)`
Create a new type descriptor for an object.

## Uses of Contract in org.springframework.util

Methods in org.springframework.util with annotations of type Contract
Modifier and Type
Method
Description
`static void`
Assert.`hasLength(String text, String message)`
Assert that the given String is not empty; that is, it must not be `null` and not the empty String.
`static void`
Assert.`hasLength(String text, Supplier<String> messageSupplier)`
Assert that the given String is not empty; that is, it must not be `null` and not the empty String.
`static boolean`
StringUtils.`hasLength(CharSequence str)`
Check that the given `CharSequence` is neither `null` nor of length 0.
`static boolean`
StringUtils.`hasLength(String str)`
Check that the given `String` is neither `null` nor of length 0.
`static void`
Assert.`hasText(String text, String message)`
Assert that the given String contains valid text content; that is, it must not be `null` and must contain at least one non-whitespace character.
`static void`
Assert.`hasText(String text, Supplier<String> messageSupplier)`
Assert that the given String contains valid text content; that is, it must not be `null` and must contain at least one non-whitespace character.
`static boolean`
StringUtils.`hasText(CharSequence str)`
Check whether the given `CharSequence` contains actual text.
`static boolean`
StringUtils.`hasText(String str)`
Check whether the given `String` contains actual text.
`static boolean`
ObjectUtils.`isArray(Object obj)`
Determine whether the given object is an array: either an Object array or a primitive array.
`static void`
Assert.`isAssignable(Class<?> superType, Class<?> subType)`
Assert that `superType.isAssignableFrom(subType)` is `true`.
`static void`
Assert.`isAssignable(Class<?> superType, Class<?> subType, String message)`
Assert that `superType.isAssignableFrom(subType)` is `true`.
`static void`
Assert.`isAssignable(Class<?> superType, Class<?> subType, Supplier<String> messageSupplier)`
Assert that `superType.isAssignableFrom(subType)` is `true`.
`static boolean`
CollectionUtils.`isEmpty(Collection<?> collection)`
Return `true` if the supplied Collection is `null` or empty.
`static boolean`
CollectionUtils.`isEmpty(Map<?,?> map)`
Return `true` if the supplied Map is `null` or empty.
`static boolean`
ObjectUtils.`isEmpty(Object obj)`
Determine whether the given object is empty.
`static boolean`
ObjectUtils.`isEmpty(Object[] array)`
Determine whether the given array is empty: i.e.
`static void`
Assert.`isInstanceOf(Class<?> type, Object obj)`
Assert that the provided object is an instance of the provided class.
`static void`
Assert.`isInstanceOf(Class<?> type, Object obj, String message)`
Assert that the provided object is an instance of the provided class.
`static void`
Assert.`isInstanceOf(Class<?> type, Object obj, Supplier<String> messageSupplier)`
Assert that the provided object is an instance of the provided class.
`static void`
Assert.`isNull(Object object, String message)`
Assert that an object is `null`.
`static void`
Assert.`isNull(Object object, Supplier<String> messageSupplier)`
Assert that an object is `null`.
`static void`
Assert.`isTrue(boolean expression, String message)`
Assert a boolean expression, throwing an `IllegalArgumentException` if the expression evaluates to `false`.
`static void`
Assert.`isTrue(boolean expression, Supplier<String> messageSupplier)`
Assert a boolean expression, throwing an `IllegalArgumentException` if the expression evaluates to `false`.
`static void`
Assert.`notEmpty(Object[] array, String message)`
Assert that an array contains elements; that is, it must not be `null` and must contain at least one element.
`static void`
Assert.`notEmpty(Object[] array, Supplier<String> messageSupplier)`
Assert that an array contains elements; that is, it must not be `null` and must contain at least one element.
`static void`
Assert.`notEmpty(Collection<?> collection, String message)`
Assert that a collection contains elements; that is, it must not be `null` and must contain at least one element.
`static void`
Assert.`notEmpty(Collection<?> collection, Supplier<String> messageSupplier)`
Assert that a collection contains elements; that is, it must not be `null` and must contain at least one element.
`static void`
Assert.`notEmpty(Map<?,?> map, String message)`
Assert that a Map contains entries; that is, it must not be `null` and must contain at least one entry.
`static void`
Assert.`notEmpty(Map<?,?> map, Supplier<String> messageSupplier)`
Assert that a Map contains entries; that is, it must not be `null` and must contain at least one entry.
`static void`
Assert.`notNull(Object object, String message)`
Assert that an object is not `null`.
`static void`
Assert.`notNull(Object object, Supplier<String> messageSupplier)`
Assert that an object is not `null`.
`static boolean`
ObjectUtils.`nullSafeEquals(Object o1, Object o2)`
Determine if the given objects are equal, returning `true` if both are `null` or `false` if only one is `null`.
`static void`
Assert.`state(boolean expression, String message)`
Assert a boolean expression, throwing an `IllegalStateException` if the expression evaluates to `false`.
`static void`
Assert.`state(boolean expression, Supplier<String> messageSupplier)`
Assert a boolean expression, throwing an `IllegalStateException` if the expression evaluates to `false`.