Uses of Annotation Interface
org.springframework.lang.Contract
Packages that use Contract
Package
Description
Core support package for annotations, meta-annotations, and merged
annotations with attribute overrides.
Type conversion system API.
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 -
Uses of Contract in org.springframework.core.convert
Methods in org.springframework.core.convert with annotations of type ContractModifier and TypeMethodDescriptionstatic TypeDescriptorTypeDescriptor.array(TypeDescriptor elementTypeDescriptor) Create a new type descriptor as an array of the specified type.static TypeDescriptorCreate a new type descriptor for an object. -
Uses of Contract in org.springframework.util
Methods in org.springframework.util with annotations of type ContractModifier and TypeMethodDescriptionstatic voidAssert that the given String is not empty; that is, it must not benulland not the empty String.static voidAssert that the given String is not empty; that is, it must not benulland not the empty String.static booleanStringUtils.hasLength(CharSequence str) Check that the givenCharSequenceis neithernullnor of length 0.static booleanCheck that the givenStringis neithernullnor of length 0.static voidAssert that the given String contains valid text content; that is, it must not benulland must contain at least one non-whitespace character.static voidAssert that the given String contains valid text content; that is, it must not benulland must contain at least one non-whitespace character.static booleanStringUtils.hasText(CharSequence str) Check whether the givenCharSequencecontains actual text.static booleanCheck whether the givenStringcontains actual text.static booleanDetermine whether the given object is an array: either an Object array or a primitive array.static voidAssert.isAssignable(Class<?> superType, Class<?> subType) Assert thatsuperType.isAssignableFrom(subType)istrue.static voidAssert.isAssignable(Class<?> superType, Class<?> subType, String message) Assert thatsuperType.isAssignableFrom(subType)istrue.static voidAssert.isAssignable(Class<?> superType, Class<?> subType, Supplier<String> messageSupplier) Assert thatsuperType.isAssignableFrom(subType)istrue.static booleanCollectionUtils.isEmpty(Collection<?> collection) Returntrueif the supplied Collection isnullor empty.static booleanReturntrueif the supplied Map isnullor empty.static booleanDetermine whether the given object is empty.static booleanDetermine whether the given array is empty: i.e.static voidAssert.isInstanceOf(Class<?> type, Object obj) Assert that the provided object is an instance of the provided class.static voidAssert.isInstanceOf(Class<?> type, Object obj, String message) Assert that the provided object is an instance of the provided class.static voidAssert.isInstanceOf(Class<?> type, Object obj, Supplier<String> messageSupplier) Assert that the provided object is an instance of the provided class.static voidAssert that an object isnull.static voidAssert that an object isnull.static voidAssert a boolean expression, throwing anIllegalArgumentExceptionif the expression evaluates tofalse.static voidAssert a boolean expression, throwing anIllegalArgumentExceptionif the expression evaluates tofalse.static voidAssert that an array contains elements; that is, it must not benulland must contain at least one element.static voidAssert that an array contains elements; that is, it must not benulland must contain at least one element.static voidAssert.notEmpty(Collection<?> collection, String message) Assert that a collection contains elements; that is, it must not benulland must contain at least one element.static voidAssert.notEmpty(Collection<?> collection, Supplier<String> messageSupplier) Assert that a collection contains elements; that is, it must not benulland must contain at least one element.static voidAssert that a Map contains entries; that is, it must not benulland must contain at least one entry.static voidAssert that a Map contains entries; that is, it must not benulland must contain at least one entry.static voidAssert that an object is notnull.static voidAssert that an object is notnull.static booleanObjectUtils.nullSafeEquals(Object o1, Object o2) Determine if the given objects are equal, returningtrueif both arenullorfalseif only one isnull.static voidAssert a boolean expression, throwing anIllegalStateExceptionif the expression evaluates tofalse.static voidAssert a boolean expression, throwing anIllegalStateExceptionif the expression evaluates tofalse.