Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/sourcetools/objectmodel/com/ibm/j9tools/om/ISourceContainer.java
6004 views
1
/*******************************************************************************
2
* Copyright (c) 2007, 2011 IBM Corp. and others
3
*
4
* This program and the accompanying materials are made available under
5
* the terms of the Eclipse Public License 2.0 which accompanies this
6
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7
* or the Apache License, Version 2.0 which accompanies this distribution and
8
* is available at https://www.apache.org/licenses/LICENSE-2.0.
9
*
10
* This Source Code may also be made available under the following
11
* Secondary Licenses when the conditions for such availability set
12
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
* General Public License, version 2 with the GNU Classpath
14
* Exception [1] and GNU General Public License, version 2 with the
15
* OpenJDK Assembly Exception [2].
16
*
17
* [1] https://www.gnu.org/software/classpath/license.html
18
* [2] http://openjdk.java.net/legal/assembly-exception.html
19
*
20
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
21
*******************************************************************************/
22
package com.ibm.j9tools.om;
23
24
import java.util.Map;
25
26
public interface ISourceContainer {
27
public String getId();
28
29
/**
30
* Retrieves the set of sources defined for in container.
31
*
32
* @return a {@link Map} of all the sources
33
*/
34
public Map<String, Source> getSources();
35
36
/**
37
* Retrieves all the local sources for this container. This does not include sources
38
* defined in included features.
39
*
40
* @return a {@link Map} of the local sources
41
*/
42
public Map<String, Source> getLocalSources();
43
44
/**
45
* Retrieves a source module definition
46
*
47
* @param sourceId The ID of the source module
48
* @return the requested source
49
*/
50
public Source getSource(String sourceId);
51
52
/**
53
* Retrieves a source module definition that is local to this container
54
*
55
* @param sourceId The ID of the source module
56
* @return the requested source
57
*/
58
public Source getLocalSource(String sourceId);
59
60
/**
61
* Adds the given source to this container.
62
*
63
* @param source the source to be added
64
*/
65
public void addSource(Source source);
66
67
/**
68
* Removes the given source from this container.
69
*
70
* @param source the source to be removed
71
*/
72
public void removeSource(Source source);
73
74
/**
75
* Removes the source with the given source ID from this container.
76
*
77
* @param sourceId the ID of the source to be removed
78
*/
79
public void removeSource(String sourceId);
80
81
/**
82
* Checks for existence of a source.
83
*
84
* @param sourceId ID of the source to check for
85
* @return <code>true</code> if the source is included for this container, <code>false</code> otherwise
86
*/
87
public boolean hasSource(String sourceId);
88
89
/**
90
* Checks for existence of a local source.
91
*
92
* @param sourceId ID of the source to check for
93
* @return <code>true</code> if the source is included for this container, <code>false</code> otherwise
94
*/
95
public boolean hasLocalSource(String sourceId);
96
}
97
98