Hello,
Typestate Checker is written using the Checker Framework and enables
basic verification of state changes in java objects through special
state annotations.
I recently released version 0.2.2, which includes support for
conditional state transitions, depending on the boolean result of a
method. This can be useful for example when checking that this code:
Iterator iter = collection.iterator();
while (iter.hasNext()) {
iter.next();
}
iter.next();
is invalid, as you can only call next() after hasNext() returned true,
so when the iterator is in a state where the next element is
available.
For more information, see the blog about the new release and checking
iterators:
http://www.warski.org/blog/?p=107
The post includes a link to an easy-to-run example, which demonstrates
the features and lets you experiment with the checker.
If you're interested, you can also see the blog post about another use-
case: checking proper usage of streams (
http://www.warski.org/blog/?
p=72).
The Typestate Checker homepage is
http://www.warski.org/typestate.html.
--
Have fun :)
Adam