public void check ( Plan plan ) { Preconditions . checkNotNull ( plan , "The passed plan is null." ) ; this . visitedNodes . clear ( ) ; plan . accept ( this ) ; }
Checks whether the given plan is valid . In particular it is checked that all contracts have the correct number of inputs and all inputs are of the expected type . In case of an invalid plan an extended RuntimeException is thrown .