Path: blob/master/sourcetools/com.ibm.uma/com/ibm/uma/om/SubdirArtifact.java
6004 views
/*******************************************************************************1* Copyright (c) 2001, 2017 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.uma.om;2223import com.ibm.uma.UMAException;2425public class SubdirArtifact extends Artifact {26Module module;27public SubdirArtifact(String dirname, Module subModule, Module module) {28super(module);29name = dirname;30type = Artifact.TYPE_SUBDIR;31this.module = subModule;32}3334@Override35public String getMakefileName() {36return getTargetName();37}38@Override39public boolean isInPhase(int phase ) throws UMAException {40return module.isInPhase(phase);41}4243@Override44public String[] getAllLibrariesInTree() {45return module.getAllLibrariesInTree();46}4748@Override49public boolean isLibDefinedInTree( String lib ) {50return module.isLibDefinedInTree(lib);51}5253public Module getSubdirModule() {54return module;55}5657@Override58public boolean evaluate() throws UMAException {59// To see if this subdirectory is actually needed60// we need to check that something in the subdirectory61// is going to be built.62if ( !super.evaluate() ) return false;63return module.evaluate();64}6566}676869