Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 6c3297c328285cf712b58bc3de99bc093a965093 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*******************************************************************************
 * Copyright (c) 2012, 2014 Wind River Systems, Inc. and others. All rights reserved.
 * This program and the accompanying materials are made available under the terms
 * of the Eclipse Public License v1.0 which accompanies this distribution, and is
 * available at http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 * Wind River Systems - initial API and implementation
 *******************************************************************************/
package org.eclipse.tcf.te.runtime.model.interfaces.factory;

import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;

/**
 * Interface to be implemented by model node factory delegates.
 */
public interface IFactoryDelegate2 extends IFactoryDelegate {

	/**
	 * Returns a new instance of an node object implementing the given node interface.
	 * <p>
	 * If <code>args</code> is <code>null</code>, the node object returned by this method
	 * should be the same as by calling {@link #newInstance(Class)}.
	 * <p>
	 * If <code>args</code> is not <code>null</code>, the method is matching the argument
	 * types with the argument types of the node object constructor(s) and call the matched
	 * constructor. If no constructor is matching the argument types, the method does return
	 * <code>null</code>.
	 *
	 * @param nodeInterface The node interface to be implemented by the node object to be created.
	 *                      Must not be <code>null</code>.
	 * @param args The arguments to be passed to a matching constructor, or <code>null</code>.
	 *
	 * @return The node object implementing the specified node interface or <code>null</code>.
	 */
	public <V extends IModelNode> V newInstance(Class<V> nodeInterface, Object[] args);
}

Back to the top