/** * Changes the state of this dependency node to be omitted for a cycle in the dependency tree. * <p> * Omitting this node sets its state to <code>OMITTED_FOR_CYCLE</code> and removes all of its children. * </p> * * @throws IllegalStateException if this dependency node's state is not <code>INCLUDED</code> * @see #OMITTED_FOR_CYCLE * @since 1.1 */ public void omitForCycle() { if ( getState() != INCLUDED ) { throw new IllegalStateException( "Only INCLUDED dependency nodes can be omitted for cycle" ); } state = OMITTED_FOR_CYCLE; removeAllChildren(); }