Path: blob/master/sourcetools/objectmodel/com/ibm/j9tools/om/ISourceContainer.java
6004 views
/*******************************************************************************1* Copyright (c) 2007, 2011 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* 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-exception20*******************************************************************************/21package com.ibm.j9tools.om;2223import java.util.Map;2425public interface ISourceContainer {26public String getId();2728/**29* Retrieves the set of sources defined for in container.30*31* @return a {@link Map} of all the sources32*/33public Map<String, Source> getSources();3435/**36* Retrieves all the local sources for this container. This does not include sources37* defined in included features.38*39* @return a {@link Map} of the local sources40*/41public Map<String, Source> getLocalSources();4243/**44* Retrieves a source module definition45*46* @param sourceId The ID of the source module47* @return the requested source48*/49public Source getSource(String sourceId);5051/**52* Retrieves a source module definition that is local to this container53*54* @param sourceId The ID of the source module55* @return the requested source56*/57public Source getLocalSource(String sourceId);5859/**60* Adds the given source to this container.61*62* @param source the source to be added63*/64public void addSource(Source source);6566/**67* Removes the given source from this container.68*69* @param source the source to be removed70*/71public void removeSource(Source source);7273/**74* Removes the source with the given source ID from this container.75*76* @param sourceId the ID of the source to be removed77*/78public void removeSource(String sourceId);7980/**81* Checks for existence of a source.82*83* @param sourceId ID of the source to check for84* @return <code>true</code> if the source is included for this container, <code>false</code> otherwise85*/86public boolean hasSource(String sourceId);8788/**89* Checks for existence of a local source.90*91* @param sourceId ID of the source to check for92* @return <code>true</code> if the source is included for this container, <code>false</code> otherwise93*/94public boolean hasLocalSource(String sourceId);95}969798