Skip to content

Commit c1c3306

Browse files
committed
Javadoc
1 parent efba03a commit c1c3306

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/main/java/com/google/testing/compile/CompilationRule.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
import javax.lang.model.util.Types;
4040

4141
/**
42-
* A {@link JUnit4} {@link Rule} that executes tests such that an instances of {@link Elements}
43-
* and {@link Types} are available during execution.
42+
* A {@link JUnit4} {@link Rule} that executes tests such that a instances of {@link Elements} and
43+
* {@link Types} are available during execution.
4444
*
4545
* <p>To use this rule in a test, just add the following field: <pre> {@code
4646
* @Rule public CompilationRule compilationRule = new CompilationRule();}
@@ -99,11 +99,21 @@ public boolean process(Set<? extends TypeElement> annotations,
9999
};
100100
}
101101

102+
/**
103+
* Returns the {@link Elements} instance associated with the current execution of the rule.
104+
*
105+
* @throws IllegalStateException if this method is invoked outside the execution of the rule.
106+
*/
102107
public Elements getElements() {
103108
checkState(elements != null, "Not running within the rule");
104109
return elements;
105110
}
106111

112+
/**
113+
* Returns the {@link Types} instance associated with the current execution of the rule.
114+
*
115+
* @throws IllegalStateException if this method is invoked outside the execution of the rule.
116+
*/
107117
public Types getTypes() {
108118
checkState(elements != null, "Not running within the rule");
109119
return types;

0 commit comments

Comments
 (0)