Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/sourcetools/com.ibm.uma/com/ibm/uma/IPlatform.java
6004 views
1
/*******************************************************************************
2
* Copyright (c) 2001, 2017 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.uma;
23
24
import java.util.HashSet;
25
import java.util.Vector;
26
27
import com.ibm.uma.om.Artifact;
28
import com.ibm.uma.om.Module;
29
30
import freemarker.template.TemplateModel;
31
32
public interface IPlatform {
33
34
// Allows the platform to add options to individual artifacts, modify the artifacts,
35
// and/or add or delete artifacts.
36
// e.g., Calculate and add Base DLL addresses.
37
public abstract void decorateModules( Vector<Module> modules ) throws UMAException;
38
39
// Per Artifact API
40
public abstract void writePlatformSpecificFiles(Artifact artifact) throws UMAException;
41
public abstract StringBuffer writeMakefileExtras(Artifact artifact) throws UMAException;
42
public abstract StringBuffer writeMakefilePostscript(Artifact artifact) throws UMAException;
43
public abstract StringBuffer writeMakefileFlagsLine(Artifact artifact) throws UMAException;
44
45
46
// Informational API
47
public abstract String getObjectExtension() throws UMAException;
48
49
// Default location to place artifact types
50
public abstract String getExecutablePath() throws UMAException;
51
public abstract String getSharedLibPath() throws UMAException;
52
public abstract String getStaticLibPath() throws UMAException;
53
54
55
// Query API
56
public abstract String replaceMacro(String macro) throws UMAException;
57
58
// Used to determine if two or more artifacts will be written to the same file.
59
public abstract String getLibOnDiskName(Artifact artifact) throws UMAException;
60
61
// Used when writing the uma_macros.mk file.
62
public abstract void addLibraryLocationInformation(Artifact artifact, StringBuffer libLocations) throws UMAException;
63
64
// Used to add extras to the artifact makefile.
65
public abstract void addTargetSpecificObjectsForStaticLink(HashSet<String> objtable, Artifact artifact) throws UMAException;
66
public abstract void addArtifactSpecificMakefileInformation(Artifact artifact, StringBuffer buffer) throws UMAException;
67
68
// Used to add platform specific targets to the root makefile.
69
public abstract void writeTopLevelTargets(StringBuffer buffer) throws UMAException;
70
71
// Used to implement FreeMarker Support
72
public abstract String getTargetNameWithRelease(Artifact artifact) throws UMAException;
73
public abstract boolean isType(String type) throws UMAException;
74
public abstract boolean isProcessor(String processor) throws UMAException;
75
public abstract String[] getProcessor() throws UMAException;
76
77
// Used to extend FreeMarker Support
78
public abstract TemplateModel getDataModelExtension(String prefixTag, String extensionTag) throws UMAException;
79
}
80
81