类 OutputCapture
java.lang.Object
cn.taketoday.framework.test.system.OutputCapture
- 所有已实现的接口:
CapturedOutput,CharSequence
Provides support for capturing
System.out and System.err.- 作者:
- Madhura Bhave, Phillip Webb, Andy Wilkinson, Sam Brannen
- 另请参阅:
-
嵌套类概要
嵌套类修饰符和类型类说明private static classSave, disable and restore AnsiOutput without it needing to be on the classpath.private static classA captured string that forms part of the full output.private static classAnOutputStreamimplementation that captures written strings.private static classAPrintStreamimplementation that captures written strings.private static classA capture session that capturesSystem.outandSystem.err.(专用程序包) static enumTypes of content that can be captured. -
字段概要
字段修饰符和类型字段说明private final AtomicReference<String>private OutputCapture.AnsiOutputStateprivate final AtomicReference<String>private final AtomicReference<String>private final Deque<OutputCapture.SystemCapture> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明(专用程序包) Stringbuild(Predicate<OutputCapture.Type> filter) (专用程序包) voidbooleanprivate Stringget(AtomicReference<String> existing, Predicate<OutputCapture.Type> filter) getAll()Return all content (bothSystem.outandSystem.err) in the order that it was captured.getErr()ReturnSystem.errcontent in the order that it was captured.getOut()ReturnSystem.outcontent in the order that it was captured.inthashCode()(专用程序包) final voidpop()Pop the last system capture session from the stack.(专用程序包) final voidpush()Push a new system capture session onto the stack.(专用程序包) voidreset()Resets the current capture session, clearing its captured output.toString()从接口继承的方法 cn.taketoday.framework.test.system.CapturedOutput
charAt, length, subSequence从接口继承的方法 java.lang.CharSequence
chars, codePoints, isEmpty
-
字段详细资料
-
systemCaptures
-
ansiOutputState
-
out
-
err
-
all
-
-
构造器详细资料
-
OutputCapture
OutputCapture()
-
-
方法详细资料
-
push
final void push()Push a new system capture session onto the stack. -
pop
final void pop()Pop the last system capture session from the stack. -
equals
-
hashCode
public int hashCode() -
toString
- 指定者:
toString在接口中CharSequence- 覆盖:
toString在类中Object
-
getAll
Return all content (bothSystem.outandSystem.err) in the order that it was captured.- 指定者:
getAll在接口中CapturedOutput- 返回:
- all captured output
-
getOut
ReturnSystem.outcontent in the order that it was captured.- 指定者:
getOut在接口中CapturedOutput- 返回:
System.outcaptured output
-
getErr
ReturnSystem.errcontent in the order that it was captured.- 指定者:
getErr在接口中CapturedOutput- 返回:
System.errcaptured output
-
reset
void reset()Resets the current capture session, clearing its captured output. -
clearExisting
void clearExisting() -
get
-
build
-