Path: blob/master/sourcetools/com.ibm.uma/com/ibm/uma/IPlatform.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;2223import java.util.HashSet;24import java.util.Vector;2526import com.ibm.uma.om.Artifact;27import com.ibm.uma.om.Module;2829import freemarker.template.TemplateModel;3031public interface IPlatform {3233// Allows the platform to add options to individual artifacts, modify the artifacts,34// and/or add or delete artifacts.35// e.g., Calculate and add Base DLL addresses.36public abstract void decorateModules( Vector<Module> modules ) throws UMAException;3738// Per Artifact API39public abstract void writePlatformSpecificFiles(Artifact artifact) throws UMAException;40public abstract StringBuffer writeMakefileExtras(Artifact artifact) throws UMAException;41public abstract StringBuffer writeMakefilePostscript(Artifact artifact) throws UMAException;42public abstract StringBuffer writeMakefileFlagsLine(Artifact artifact) throws UMAException;434445// Informational API46public abstract String getObjectExtension() throws UMAException;4748// Default location to place artifact types49public abstract String getExecutablePath() throws UMAException;50public abstract String getSharedLibPath() throws UMAException;51public abstract String getStaticLibPath() throws UMAException;525354// Query API55public abstract String replaceMacro(String macro) throws UMAException;5657// Used to determine if two or more artifacts will be written to the same file.58public abstract String getLibOnDiskName(Artifact artifact) throws UMAException;5960// Used when writing the uma_macros.mk file.61public abstract void addLibraryLocationInformation(Artifact artifact, StringBuffer libLocations) throws UMAException;6263// Used to add extras to the artifact makefile.64public abstract void addTargetSpecificObjectsForStaticLink(HashSet<String> objtable, Artifact artifact) throws UMAException;65public abstract void addArtifactSpecificMakefileInformation(Artifact artifact, StringBuffer buffer) throws UMAException;6667// Used to add platform specific targets to the root makefile.68public abstract void writeTopLevelTargets(StringBuffer buffer) throws UMAException;6970// Used to implement FreeMarker Support71public abstract String getTargetNameWithRelease(Artifact artifact) throws UMAException;72public abstract boolean isType(String type) throws UMAException;73public abstract boolean isProcessor(String processor) throws UMAException;74public abstract String[] getProcessor() throws UMAException;7576// Used to extend FreeMarker Support77public abstract TemplateModel getDataModelExtension(String prefixTag, String extensionTag) throws UMAException;78}798081