接口的使用
cn.taketoday.util.function.ThrowingConsumer
使用ThrowingConsumer的程序包
程序包
说明
Support classes for components that contribute generated code equivalent to a
runtime behavior.
Useful generic
java.util.function helper classes.-
cn.taketoday.aot.generate中ThrowingConsumer的使用
修饰符和类型类说明(专用程序包) class修饰符和类型方法说明default voidGeneratedFiles.addFile(GeneratedFiles.Kind kind, String path, ThrowingConsumer<Appendable> content) Add a generated file of the specifiedGeneratedFiles.Kindwith content written to anAppendablepassed to the givenThrowingConsumer.default voidGeneratedFiles.addResourceFile(String path, ThrowingConsumer<Appendable> content) Add a generatedresource filewith content written to anAppendablepassed to the givenThrowingConsumer.default voidGeneratedFiles.addSourceFile(String className, ThrowingConsumer<Appendable> content) Add a generatedsource filewith content written to anAppendablepassed to the givenThrowingConsumer.参数类型为ThrowingConsumer的cn.taketoday.aot.generate中的构造器 -
cn.taketoday.core.io中ThrowingConsumer的使用
修饰符和类型接口说明interfaceExtended interface for a resource that is loaded from an enclosing 'context', e.g. from ajakarta.servlet.ServletContextbut also from plain classpath paths or relative file system paths (specified without an explicit prefix, hence applying relative to the localResourceLoader's context).interfaceSimple interface for objects that are sources for anInputStream.interfaceInterface for a resource descriptor that abstracts from the actual type of underlying resource, such as a file or class path resource.interfaceExtended interface for a resource that supports writing to it.修饰符和类型类说明classAbstract base class for resources which resolve URLs into File references, such asUrlResourceorClassPathResource.classConvenience base class forResourceimplementations, pre-implementing typical behavior.classResourceimplementation for a given byte array.classResourceimplementation for class path resources.private static classClassPathResource that explicitly expresses a context-relative path through implementing the ContextResource interface.protected static classClassPathResource that explicitly expresses a context-relative path through implementing the ContextResource interface.classSimpleResourceimplementation that holds a resource description but does not point to an actually readable resource.classHolder that combines aResourcedescriptor with a specific encoding orCharsetto be used for reading from the resource.classprivate static classFileSystemResource that explicitly expresses a context-relative path through implementing the ContextResource interface.classSubclass ofUrlResourcewhich assumes file resolution, to the degree of implementing theWritableResourceinterface for it.classResourceimplementation for a givenInputStream.classResourceimplementation forModuleresolution, performingModuleResource.getInputStream()access viaModule.getResourceAsStream(java.lang.String).classclassThis class implements the Wrapper or Decorator pattern.classResourceimplementation forjava.net.URLlocators.class -
cn.taketoday.util.function中ThrowingConsumer的使用
修饰符和类型方法说明static <T> ThrowingConsumer<T>ThrowingConsumer.of(ThrowingConsumer<T> consumer) Lambda friendly convenience method that can be used to create aThrowingConsumerwhere theaccept(Object)method wraps any checked exception thrown by the supplied lambda expression or method reference.static <T> ThrowingConsumer<T>ThrowingConsumer.of(ThrowingConsumer<T> consumer, BiFunction<String, Exception, RuntimeException> exceptionWrapper) Lambda friendly convenience method that can be used to create aThrowingConsumerwhere theaccept(Object)method wraps any thrown checked exceptions using the givenexceptionWrapper.default ThrowingConsumer<T>ThrowingConsumer.throwing(BiFunction<String, Exception, RuntimeException> exceptionWrapper) Return a newThrowingConsumerwhere theaccept(Object)method wraps any thrown checked exceptions using the givenexceptionWrapper.修饰符和类型方法说明static <T> ThrowingConsumer<T>ThrowingConsumer.of(ThrowingConsumer<T> consumer) Lambda friendly convenience method that can be used to create aThrowingConsumerwhere theaccept(Object)method wraps any checked exception thrown by the supplied lambda expression or method reference.static <T> ThrowingConsumer<T>ThrowingConsumer.of(ThrowingConsumer<T> consumer, BiFunction<String, Exception, RuntimeException> exceptionWrapper) Lambda friendly convenience method that can be used to create aThrowingConsumerwhere theaccept(Object)method wraps any thrown checked exceptions using the givenexceptionWrapper.