public final class CompilationRule
extends java.lang.Object
implements org.junit.rules.TestRule
JUnit4 Rule that executes tests such that a instances of Elements and
Types are available during execution.
To use this rule in a test, just add the following field:
@Rule public CompilationRule compilationRule = new CompilationRule();| Constructor and Description |
|---|
CompilationRule() |
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
javax.lang.model.util.Elements |
getElements()
Returns the
Elements instance associated with the current execution of the rule. |
javax.lang.model.util.Types |
getTypes()
Returns the
Types instance associated with the current execution of the rule. |
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
apply in interface org.junit.rules.TestRulepublic javax.lang.model.util.Elements getElements()
Elements instance associated with the current execution of the rule.java.lang.IllegalStateException - if this method is invoked outside the execution of the rule.public javax.lang.model.util.Types getTypes()
Types instance associated with the current execution of the rule.java.lang.IllegalStateException - if this method is invoked outside the execution of the rule.Copyright © 2013-2017. All Rights Reserved.