All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ow2.jasmine.jade.reflex.util.Util Maven / Gradle / Ivy

/***
 * Reflex-Fractal
 *
 * Copyright (C) 2007 : INRIA - Domaine de Voluceau, Rocquencourt, B.P. 105, 
 * 78153 Le Chesnay Cedex - France 
 *
 * This library 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 2 of the License, or (at your option) any later version.
 *
 * This library 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 this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Contact: jade  inrialpes  fr
 *
 * Author: SARDES project - http://sardes.inrialpes.fr
 *
 */
 
package org.ow2.jasmine.jade.reflex.util;

import org.objectweb.fractal.api.Component;
import org.objectweb.fractal.api.NoSuchInterfaceException;
import org.objectweb.fractal.util.Fractal;

/**
 * Provides utility methods to deal with Fractal components.
 * 
 * @author Noel de palma
 * @author Fabienne Boyer
 */
public class Util {
	
	/**
	 * utility method which search if a component has a direct subcomponent with a given name.
	 * @param cmp the component to inspect
	 * @param subcmpname the name of the subcomponent to search
	 * @return 	the reference of the subcomponent (null if not found) 
	 */
	public static Component search(Component cmp, String subcmpname){
		Component[] subcmp;
		String curName = null;
		try {		
			subcmp = (Fractal.getContentController(cmp)).getFcSubComponents();
			for (int i = 0; i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy