Skip to content

Commit c77c2af

Browse files
author
nat.pryce
committed
Nat: javadoc goodness
1 parent 90fce3d commit c77c2af

13 files changed

Lines changed: 109 additions & 2 deletions

File tree

‎build.xml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,32 @@
160160
</tar>
161161
</target>
162162

163+
<target name="javadoc" depends="library">
164+
<mkdir dir="build/javadoc"/>
165+
<javadoc destdir="build/javadoc" source="1.5" failonerror="yes"
166+
overview="overview.html">
167+
168+
<classpath>
169+
<fileset dir="lib/integration">
170+
<include name="*.jar"/>
171+
</fileset>
172+
</classpath>
173+
174+
<packageset dir="hamcrest-api/src/main/java"/>
175+
<packageset dir="hamcrest-library/src/main/java" excludes="org/hamcrest/internal"/>
176+
<packageset dir="hamcrest-integration/src/main/java"/>
177+
<packageset dir="build/generated-code"/>
178+
179+
<group title="Hamcrest API and Utility Classes" packages="org.hamcrest"/>
180+
<group title="Matcher Library" packages="org.hamcrest.*"/>
181+
<group title="Integration" packages="org.hamcrest.integration, org.hamcrest.integration.*"/>
182+
183+
<link offline="false" href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
184+
<link offline="false" href="http://www.junit.org/junit/javadoc/3.8.1/"/>
185+
<link offline="false" href="http://junit.sourceforge.net/javadoc_40/"/>
186+
</javadoc>
187+
</target>
188+
163189
<macrodef name="java-to-jar"
164190
description="Compile Java source and build a Jar">
165191
<attribute name="srcdir" description="Directory containg Java source"/>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<html>
2+
<head>
3+
</head>
4+
<body>
5+
<p>The stable API defining Matcher and its associated interfaces and classes.
6+
Hamcrest sub-projects define their convenience classes in the org.hamcrest package.
7+
</p>
8+
</body>
9+
</html>

‎hamcrest-integration/src/main/java/org/hamcrest/integration/EasyMock2Adapter.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import org.hamcrest.StringDescription;
77

88
/**
9-
* An adapter to allowing a Hamcrest {@link org.hamcrest.Matcher}
9+
* An adapter allowing a Hamcrest {@link org.hamcrest.Matcher}
1010
* to act as an EasyMock {@link org.easymock.IArgumentMatcher}.
1111
*
1212
* @author Joe Walnes

‎hamcrest-integration/src/main/java/org/hamcrest/integration/JMock1Adapter.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import org.hamcrest.StringDescription;
66

77
/**
8-
* An adapter to allowing a Hamcrest {@link org.hamcrest.Matcher}
8+
* An adapter allowing a Hamcrest {@link org.hamcrest.Matcher}
99
* to act as an jMock1 {@link org.jmock.core.Constraint}.
1010
* Note, this is not necessary for jMock2 as it supports Hamcrest
1111
* out of the box.

‎hamcrest-library/src/main/java/org/hamcrest/StringDescription.java‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
import org.hamcrest.internal.ArrayIterator;
99
import org.hamcrest.internal.SelfDescribingValueIterator;
1010

11+
/**
12+
* A {@link Description} that is stored as a string.
13+
*/
1114
public class StringDescription implements Description {
1215
private final StringBuffer buffer;
1316

@@ -19,6 +22,14 @@ public StringDescription(StringBuffer buffer) {
1922
this.buffer = buffer;
2023
}
2124

25+
/**
26+
* Return the description of a {@link SelfDescribing} object as a String.
27+
*
28+
* @param selfDescribing
29+
* The object to be described.
30+
* @return
31+
* The description of the object.
32+
*/
2233
public static String toString(SelfDescribing selfDescribing) {
2334
StringDescription description = new StringDescription();
2435
selfDescribing.describeTo(description);
@@ -109,6 +120,9 @@ private void toJavaSyntax(StringBuffer buffer, char ch) {
109120
}
110121
}
111122

123+
/**
124+
* Returns the description as a string.
125+
*/
112126
public String toString() {
113127
return buffer.toString();
114128
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<html>
2+
<head>
3+
</head>
4+
<body>
5+
<p>Matchers of Java Bean properties and their values.</p>
6+
</body>
7+
</html>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<html>
2+
<head>
3+
</head>
4+
<body>
5+
<p>Matchers of arrays and collections.</p>
6+
</body>
7+
</html>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<html>
2+
<head>
3+
</head>
4+
<body>
5+
<p>Fundamental matchers of objects and values, and composite matchers.</p>
6+
</body>
7+
</html>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<html>
2+
<head>
3+
</head>
4+
<body>
5+
<p>Matchers that perform numeric comparisons.</p>
6+
</body>
7+
</html>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<html>
2+
<head>
3+
</head>
4+
<body>
5+
<p>Matchers that inspect objects and classes.</p>
6+
</body>
7+
</html>

0 commit comments

Comments
 (0)