Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 7ad76417d153f4aa71cee900442db31e61968ccd (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*******************************************************************************
* Copyright (c) 2018 protos software gmbh (http://www.protos.de).
* All rights reserved.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* CONTRIBUTORS:
*           Jan Belle (initial contribution)
*
 *******************************************************************************/

package org.eclipse.etrice.generator.base.io;

import java.util.stream.Stream;

import org.eclipse.emf.common.util.URI;
import org.eclipse.xtext.naming.QualifiedName;

public interface IModelPath {
	
	public static final IModelPath EMPTY = new EmptyModelPath();
	
	/**
	 * Returns all files that could contain the object with the specified name.
	 * 
	 * @param name the fully qualified name of the object
	 * @return a stream of file uris
	 */
	public Stream<URI> getFiles(QualifiedName name);
	
	/**
	 * Returns all files on this modelpath.
	 * 
	 * @return a stream of file uris
	 */
	public Stream<URI> getAllFiles();
	
	static class EmptyModelPath implements IModelPath {
		
		@Override
		public Stream<URI> getFiles(QualifiedName name) {
			return Stream.empty();
		}

		@Override
		public Stream<URI> getAllFiles() {
			return Stream.empty();
		}
	}
}

Back to the top