/** * * Interface for specifying what to do with the file resource. * */ @FunctionalInterface public interface FileWriterAction { void writeFile(FileWriter writer) throws IOException; }
/** * Simple callback interface for proceeding with the target invocation. * Concrete interceptors/aspects adapt this to their invocation mechanism. */ @FunctionalInterface protected interface InvocationCallback { Object proceedWithInvocation() throws Throwable; }
/** * Extract content chunks that represent links. */ @FunctionalInterface protected interface LinkParser { void parse(String content, SortedSet<ContentChunkInfo> result); }
/** * A (wrapper) object representing a cache value. */ @FunctionalInterface interface ValueWrapper { /** * Return the actual value in the cache. */ @Nullable Object get(); }
/** * Handles a DeferredResult value when set. */ @FunctionalInterface public interface DeferredResultHandler { void handleResult(Object result); }
/** * Action to take on each method. */ @FunctionalInterface public interface MethodCallback { /** * Perform an operation using the given method. * @param method the method to operate on */ void doWith(Method method) throws IllegalArgumentException, IllegalAccessException; }
/** * Callback interface invoked on each field in the hierarchy. */ @FunctionalInterface public interface FieldCallback { /** * Perform an operation using the given field. * @param field the field to operate on */ void doWith(Field field) throws IllegalArgumentException, IllegalAccessException; }
/** * Callback optionally used to filter fields to be operated on by a field callback. */ @FunctionalInterface public interface FieldFilter { /** * Determine whether the given field matches. * @param field the field to check */ boolean matches(Field field); }
/** * Interface used to generate fields. */ @FunctionalInterface public interface FieldAdder { void generateField(ClassWriter cw, CodeFlow codeflow); }
/** * Extract content chunks that represent links. */ @FunctionalInterface protected interface LinkParser { void parse(String cssContent, SortedSet<ContentChunkInfo> result); }
/** * Callback optionally used to filter methods to be operated on by a method callback. */ @FunctionalInterface public interface MethodFilter { /** * Determine whether the given method matches. * @param method the method to check */ boolean matches(Method method); }
/** * Interface used to generate {@code clinit} static initializer blocks. */ @FunctionalInterface public interface ClinitAdder { void generateCode(MethodVisitor mv, CodeFlow codeflow); }
/** * Strategy interface used to resolve replacement values for placeholders contained in Strings. */ @FunctionalInterface public interface PlaceholderResolver { /** * Resolve the supplied placeholder name to the replacement value. * @param placeholderName the name of the placeholder to resolve * @return the replacement value, or {@code null} if no replacement is to be made */ @Nullable String resolvePlaceholder(String placeholderName); }
/** * Internal callback interface for the autodetection process. */ @FunctionalInterface private interface AutodetectCallback { /** * Called during the autodetection process to decide whether * or not a bean should be included. * @param beanClass the class of the bean * @param beanName the name of the bean */ boolean include(Class<?> beanClass, String beanName); }
/** * Callback interface providing {@link CacheOperation} instance(s) based on * a given {@link CacheAnnotationParser}. */ @FunctionalInterface protected interface CacheOperationProvider { /** * Return the {@link CacheOperation} instance(s) provided by the specified parser. * @param parser the parser to use * @return the cache operations, or {@code null} if none found */ @Nullable Collection<CacheOperation> getCacheOperations(CacheAnnotationParser parser); }
/** * Defines the contract for bodies that can be written directly to an * {@link OutputStream}. Useful with HTTP client libraries that provide * indirect access to an {@link OutputStream} via a callback mechanism. */ @FunctionalInterface interface Body { /** * Write this body to the given {@link OutputStream}. * @param outputStream the output stream to write to * @throws IOException in case of I/O errors */ void writeTo(OutputStream outputStream) throws IOException; }
/** * A contract for creating a {@link ClientHttpResponse}. * Implementations can be obtained via {@link MockRestResponseCreators}. * * @author Craig Walls * @since 3.2 */ @FunctionalInterface public interface ResponseCreator { /** * Create a response for the given request. * @param request the request */ ClientHttpResponse createResponse(@Nullable ClientHttpRequest request) throws IOException; }
/** * Failure callback for a {@link ListenableFuture}. * * @author Sebastien Deleuze * @since 4.1 */ @FunctionalInterface public interface FailureCallback { /** * Called when the {@link ListenableFuture} completes with failure. * <p>Note that Exceptions raised by this method are ignored. * @param ex the failure */ void onFailure(Throwable ex); }
/** * Callback for customizing a given bean definition. * Designed for use with a lambda expression or method reference. * * @author Juergen Hoeller * @since 5.0 * @see org.springframework.beans.factory.support.BeanDefinitionBuilder#applyCustomizers */ @FunctionalInterface public interface BeanDefinitionCustomizer { /** * Customize the given bean definition. */ void customize(BeanDefinition bd); }
/** * A strategy for matching subscriptions. * * @author Rossen Stoyanchev * @since 4.2 */ @FunctionalInterface public interface SimpSubscriptionMatcher { /** * Match the given subscription. * @param subscription the subscription to match * @return {@code true} in case of a match, {@code false} otherwise */ boolean match(SimpSubscription subscription); }