Skip to content

Commit

Permalink
compiler: update WordVerification Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
zapster committed Aug 17, 2021
1 parent d094516 commit f78853a
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,26 @@
*
* <h1>Motivation</h1>
*
* We do not want to leak {@code WordTypes} to arbitrary places, because those should be handled at
* the very beginning of the pipeline (i.e., during graph building). On the other hand, we would
* like to detect cases where this failed to issue proper error messages instead of doing the wrong
* thing and maybe or maybe not failing arbitrarily. Thus, we only give access to assertions instead
* of the full features.
* This interface exists to avoid exposing {@code WordTypes} in {@link CoreProviders}. Word values
* must be transformed to other types at the very beginning of the pipeline (i.e., during graph
* building). {@link WordVerification} is used to detect when this invariant is violated and to
* issue proper error messages.
*/
public interface WordVerification {

/**
* Verifies that a given type is a word type.
*
* @return {@code true}
* @throws Error if the assertion doe not hold
* @throws Error if the assertion does not hold
*/
boolean verifyIsWord(JavaType type);

/**
* Verifies that a given type is not a word type.
*
* @return {@code true}
* @throws Error if the assertion doe not hold
* @throws Error if the assertion does not hold
*/
boolean verifyIsNoWord(JavaType type);

Expand Down

0 comments on commit f78853a

Please sign in to comment.