Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2011 Michael Ruflin, Andr´┐Ż Locher, Claudia von Bastian. This file is part of Tatool. Tatool is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Tatool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Tatool. If not, see <http://www.gnu.org/licenses/>. /
package ch.tatool.core.element;
Use this helper class to add temporary elements to the execution. The actual execution order depends on the implementor of TemporaryExecutionElementSupport

Author(s):
Michael Ruflin
Static instance object - protected so that subclasses could overwrite the default with a different implementation.
Get the util instance.
		return ;
	}

Finds a TemporaryElementSupport object. The default implementation searches through all handlers and finally checks the strategy object

Parameters:
context the ExecutionContext to search through
Returns:
an object or null if none could be found
		// find a handler that provides the support
		List<Elementelements = context.getElementStack();
		ListIterator<Elementiterator = elements.listIterator(elements.size());
		while (iterator.hasPrevious()) {
			Element e = iterator.previous();
			for (Object handler : e.getHandlers()) {
				if (handler instanceof TemporaryElementSupportreturn (TemporaryElementSupporthandler;
			}
		}
		// check the strategy
		if (strategy instanceof TemporaryElementSupport) {
			return (TemporaryElementSupportstrategy
		}
		// not found
		return null;
	}
New to GrepCode? Check out our FAQ X