hamcrest-core-1.3.jar
登录
|
org.hamcrest:hamcrest-core:1.3
META-INF
org
hamcrest
DiagnosingMatcher.java
core
CustomTypeSafeMatcher.java
BaseMatcher.java
internal
MatcherAssert.java
package.html
CustomMatcher.java
SelfDescribing.java
TypeSafeMatcher.java
StringDescription.java
Matcher.java
BaseDescription.java
Description.java
Factory.java
CoreMatchers.java
TypeSafeDiagnosingMatcher.java
FeatureMatcher.java
Condition.java
StringDescription.java
清空
类结构
package org.hamcrest; import java.io.
IOException
; /** * A {@link Description} that is stored as a string. */ public class
StringDescription
extends
BaseDescription
{ private final
Appendable
out
; public
StringDescription
() { this(new
StringBuilder
()); } public
StringDescription
(
Appendable
out
) { this.
out
=
out
; } /** * Return the description of a {@link SelfDescribing} object as a String. * * @param selfDescribing * The object to be described. * @return * The description of the object. */ public static
String
toString
(
SelfDescribing
selfDescribing
) { return new
StringDescription
().
appendDescriptionOf
(
selfDescribing
).
toString
(); } /** * Alias for {@link #toString(SelfDescribing)}. */ public static
String
asString
(
SelfDescribing
selfDescribing
) { return
toString
(
selfDescribing
); } @
Override
protected void
append
(
String
str
) { try {
out
.
append
(
str
); } catch (
IOException
e
) { throw new
RuntimeException
("Could not write description",
e
); } } @
Override
protected void
append
(char
c
) { try {
out
.
append
(
c
); } catch (
IOException
e
) { throw new
RuntimeException
("Could not write description",
e
); } } /** * Returns the description as a string. */ @
Override
public
String
toString
() { return
out
.
toString
(); } }
查找资源
Jre/Lib
输入类名或文件名
类结构窗口