diff options
Diffstat (limited to 'Tools/Java/Source/Common/org')
7 files changed, 0 insertions, 531 deletions
diff --git a/Tools/Java/Source/Common/org/tianocore/common/cache/FileTimeStamp.java b/Tools/Java/Source/Common/org/tianocore/common/cache/FileTimeStamp.java deleted file mode 100644 index 968d31f15c..0000000000 --- a/Tools/Java/Source/Common/org/tianocore/common/cache/FileTimeStamp.java +++ /dev/null @@ -1,83 +0,0 @@ -/** @file
-This file is to define the FileTimeStamp class for speeding up the dependency check.
-
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-package org.tianocore.common.cache;
-
-import java.io.File;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.HashMap;
-
-/**
- FileTimeStamp class is used to cache the time stamp of accessing file, which
- will speed up the dependency check for build
- **/
-public class FileTimeStamp {
- //
- // cache the modified timestamp of files accessed, to speed up the depencey check
- //
- private static Map<String, Long> timeStampCache = new HashMap<String, Long>();
-
- /**
- Get the time stamp of given file. It will try the cache first and then
- get from file system if no time stamp of the file is cached.
-
- @param file File name
-
- @return long The time stamp of the file
- **/
- synchronized public static long get(String file) {
- long timeStamp = 0;
-
- Long value = timeStampCache.get(file);
- if (value != null) {
- timeStamp = value.longValue();
- } else {
- timeStamp = new File(file).lastModified();
- timeStampCache.put(file, new Long(timeStamp));
- }
-
- return timeStamp;
- }
-
- /**
- Force update the time stamp for the given file
-
- @param file File name
- @param timeStamp The time stamp of the file
- **/
- synchronized public static void update(String file, long timeStamp) {
- timeStampCache.put(file, new Long(timeStamp));
- }
-
- /**
- Force update the time stamp for the given file
-
- @param file File name
- **/
- synchronized public static void update(String file) {
- long timeStamp = new File(file).lastModified();
- timeStampCache.put(file, new Long(timeStamp));
- }
-
- /**
- Check if the time stamp of given file has been cached for not
-
- @param file The file name
-
- @return boolean
- **/
- synchronized public static boolean containsKey(String file) {
- return timeStampCache.containsKey(file);
- }
-}
diff --git a/Tools/Java/Source/Common/org/tianocore/common/definitions/EdkDefinitions.java b/Tools/Java/Source/Common/org/tianocore/common/definitions/EdkDefinitions.java deleted file mode 100644 index e5f510a199..0000000000 --- a/Tools/Java/Source/Common/org/tianocore/common/definitions/EdkDefinitions.java +++ /dev/null @@ -1,111 +0,0 @@ -/** @file
- EdkDefinitions Class.
-
- EdkDefinitions class incldes the common EDK definitions which are used
- by the Tools.
-
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-package org.tianocore.common.definitions;
-
-/**
- This class includes the common EDK definitions.
- **/
-public class EdkDefinitions {
- ///
- /// MODULE_TYPE definitions
- ///
- public final static String MODULE_TYPE_BASE = "BASE";
- public final static String MODULE_TYPE_SEC = "SEC";
- public final static String MODULE_TYPE_PEI_CORE = "PEI_CORE";
- public final static String MODULE_TYPE_PEIM = "PEIM";
- public final static String MODULE_TYPE_DXE_CORE = "DXE_CORE";
- public final static String MODULE_TYPE_DXE_DRIVER = "DXE_DRIVER";
- public final static String MODULE_TYPE_DXE_RUNTIME_DRIVER = "DXE_RUNTIME_DRIVER";
- public final static String MODULE_TYPE_DXE_SMM_DRIVER = "DXE_SMM_DRIVER";
- public final static String MODULE_TYPE_DXE_SAL_DRIVER = "DXE_SAL_DRIVER";
- public final static String MODULE_TYPE_UEFI_DRIVER = "UEFI_DRIVER";
- public final static String MODULE_TYPE_UEFI_APPLICATION = "UEFI_APPLICATION";
- public final static String MODULE_TYPE_USER_DEFINED = "USER_DEFINED";
- public final static String MODULE_TYPE_TOOL = "TOOL";
-
- ///
- /// Extension definitions for each of module types
- ///
- public final static String ModuleTypeExtensions[][] = {
- { MODULE_TYPE_BASE, ".FFS" },
- { MODULE_TYPE_SEC, ".SEC" },
- { MODULE_TYPE_PEI_CORE, ".PEI" },
- { MODULE_TYPE_PEIM, ".PEI" },
- { MODULE_TYPE_DXE_CORE, ".DXE" },
- { MODULE_TYPE_DXE_DRIVER, ".DXE" },
- { MODULE_TYPE_DXE_RUNTIME_DRIVER, ".DXE" },
- { MODULE_TYPE_DXE_SMM_DRIVER, ".DXE" },
- { MODULE_TYPE_DXE_SAL_DRIVER, ".DXE" },
- { MODULE_TYPE_UEFI_DRIVER, ".DXE" },
- { MODULE_TYPE_UEFI_APPLICATION, ".APP" },
- { MODULE_TYPE_USER_DEFINED, ".FFS" },
- { MODULE_TYPE_TOOL, ".FFS" }
- };
-
- ///
- /// FFS_TYPE definitions
- ///
- public final static int EFI_FV_FILETYPE_ALL = 0x00;
- public final static int EFI_FV_FILETYPE_RAW = 0x01;
- public final static int EFI_FV_FILETYPE_FREEFORM = 0x02;
- public final static int EFI_FV_FILETYPE_SECURITY_CORE = 0x03;
- public final static int EFI_FV_FILETYPE_PEI_CORE = 0x04;
- public final static int EFI_FV_FILETYPE_DXE_CORE = 0x05;
- public final static int EFI_FV_FILETYPE_PEIM = 0x06;
- public final static int EFI_FV_FILETYPE_DRIVER = 0x07;
- public final static int EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER = 0x08;
- public final static int EFI_FV_FILETYPE_APPLICATION = 0x09;
- public final static int EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE = 0x0B;
- public final static int EFI_FV_FILETYPE_FFS_PAD = 0xF0;
-
- ///
- /// SECTION_TYPE definitions
- ///
- public final static String EFI_SECTION_COMPRESSION = "EFI_SECTION_COMPRESSION";
- public final static String EFI_SECTION_GUID_DEFINED = "EFI_SECTION_GUID_DEFINED";
- public final static String EFI_SECTION_PE32 = "EFI_SECTION_PE32";
- public final static String EFI_SECTION_PIC = "EFI_SECTION_PIC";
- public final static String EFI_SECTION_TE = "EFI_SECTION_TE";
- public final static String EFI_SECTION_DXE_DEPEX = "EFI_SECTION_DXE_DEPEX";
- public final static String EFI_SECTION_VERSION = "EFI_SECTION_VERSION";
- public final static String EFI_SECTION_USER_INTERFACE = "EFI_SECTION_USER_INTERFACE";
- public final static String EFI_SECTION_COMPATIBILITY16 = "EFI_SECTION_COMPATIBILITY16";
- public final static String EFI_SECTION_FIRMWARE_VOLUME_IMAGE = "EFI_SECTION_FIRMWARE_VOLUME_IMAGE";
- public final static String EFI_SECTION_FREEFORM_SUBTYPE_GUID = "EFI_SECTION_FREEFORM_SUBTYPE_GUID";
- public final static String EFI_SECTION_RAW = "EFI_SECTION_RAW";
- public final static String EFI_SECTION_PEI_DEPEX = "EFI_SECTION_PEI_DEPEX";
-
- ///
- /// Extension definitions for each of section types
- ///
- public final static String SectionTypeExtensions[][] = {
- { EFI_SECTION_COMPRESSION, ".sec" },
- { EFI_SECTION_GUID_DEFINED, ".sec" },
- { EFI_SECTION_PE32, ".pe32" },
- { EFI_SECTION_PIC, ".pic" },
- { EFI_SECTION_TE, ".tes" },
- { EFI_SECTION_DXE_DEPEX, ".dpx" },
- { EFI_SECTION_VERSION, ".ver" },
- { EFI_SECTION_USER_INTERFACE, ".ui" },
- { EFI_SECTION_COMPATIBILITY16, ".sec" },
- { EFI_SECTION_FIRMWARE_VOLUME_IMAGE, ".sec" },
- { EFI_SECTION_FREEFORM_SUBTYPE_GUID, ".sec" },
- { EFI_SECTION_RAW, ".sec" },
- { EFI_SECTION_PEI_DEPEX, ".dpx" }
- };
-}
diff --git a/Tools/Java/Source/Common/org/tianocore/common/definitions/ToolDefinitions.java b/Tools/Java/Source/Common/org/tianocore/common/definitions/ToolDefinitions.java deleted file mode 100644 index dc6d9f772f..0000000000 --- a/Tools/Java/Source/Common/org/tianocore/common/definitions/ToolDefinitions.java +++ /dev/null @@ -1,105 +0,0 @@ -/** @file
- ToolDefinitions Class.
-
- ToolDefinitions class incldes the common Tool definitions.
-
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-package org.tianocore.common.definitions;
-
-import java.io.File;
-
-/**
- This class includes the common Tool definitions.
- **/
-public class ToolDefinitions {
- ///
- /// Line separator (carriage return-line feed, CRLF)
- ///
- public final static String LINE_SEPARATOR = "\r\n";
-
- ///
- /// Framework Database (FrameworkDatabase.db) file path
- ///
- public final static String FRAMEWORK_DATABASE_FILE_PATH =
- "Tools" + File.separatorChar + "Conf" + File.separatorChar + "FrameworkDatabase.db";
-
- ///
- /// Target (target.txt) file path
- ///
- public final static String TARGET_FILE_PATH =
- "Tools" + File.separatorChar + "Conf" + File.separatorChar + "target.txt";
-
- ///
- /// Default Tools Definition (tools_def.txt) file path
- ///
- public final static String DEFAULT_TOOLS_DEF_FILE_PATH =
- "Tools" + File.separatorChar + "Conf" + File.separatorChar + "tools_def.txt";
-
- ///
- /// Extension names for SPD, FPD, and MSA
- ///
- public final static String SPD_EXTENSION = ".spd";
- public final static String FPD_EXTENSION = ".fpd";
- public final static String MSA_EXTENSION = ".msa";
-
- ///
- /// Tool Chain Elements in the Tools Definition file
- ///
- public final static String TOOLS_DEF_ELEMENT_TARGET = "TARGET";
- public final static String TOOLS_DEF_ELEMENT_TOOLCHAIN = "TOOLCHAIN";
- public final static String TOOLS_DEF_ELEMENT_ARCH = "ARCH";
- public final static String TOOLS_DEF_ELEMENT_TOOLCODE = "TOOLCODE";
- public final static String TOOLS_DEF_ELEMENT_ATTRIBUTE = "ATTRIBUTE";
-
- ///
- /// Index of Tool Chain elements in the Tools Definition file
- ///
- public final static int TOOLS_DEF_ELEMENT_INDEX_TARGET = 0;
- public final static int TOOLS_DEF_ELEMENT_INDEX_TOOLCHAIN = 1;
- public final static int TOOLS_DEF_ELEMENT_INDEX_ARCH = 2;
- public final static int TOOLS_DEF_ELEMENT_INDEX_TOOLCODE = 3;
- public final static int TOOLS_DEF_ELEMENT_INDEX_ATTRIBUTE = 4;
- public final static int TOOLS_DEF_ELEMENT_INDEX_MAXIMUM = 5;
-
- ///
- /// Tool Chain Attributes in the Tools Definition file
- ///
- public final static String TOOLS_DEF_ATTRIBUTE_NAME = "NAME";
- public final static String TOOLS_DEF_ATTRIBUTE_PATH = "PATH";
- public final static String TOOLS_DEF_ATTRIBUTE_DPATH = "DPATH";
- public final static String TOOLS_DEF_ATTRIBUTE_SPATH = "SPATH";
- public final static String TOOLS_DEF_ATTRIBUTE_EXT = "EXT";
- public final static String TOOLS_DEF_ATTRIBUTE_FAMILY = "FAMILY";
- public final static String TOOLS_DEF_ATTRIBUTE_FLAGS = "FLAGS";
- public final static String TOOLS_DEF_ATTRIBUTE_LIBPATH = "LIBPATH";
- public final static String TOOLS_DEF_ATTRIBUTE_INCLUDEPATH= "INCLUDEPATH";
-
- ///
- /// Tool Chain Families in the Tools Definition file
- ///
- public final static String TOOLS_DEF_FAMILY_MSFT = "MSFT";
- public final static String TOOLS_DEF_FAMILY_INTEL = "INTEL";
- public final static String TOOLS_DEF_FAMILY_GCC = "GCC";
-
- ///
- /// Key name in the Target file
- ///
- public final static String TARGET_KEY_ACTIVE_PLATFORM = "ACTIVE_PLATFORM";
- public final static String TARGET_KEY_TARGET = "TARGET";
- public final static String TARGET_KEY_TOOLCHAIN = "TOOL_CHAIN_TAG";
- public final static String TARGET_KEY_ARCH = "TARGET_ARCH";
- public final static String TARGET_KEY_TOOLS_DEF = "TOOL_CHAIN_CONF";
- public final static String TARGET_KEY_MULTIPLE_THREAD = "MULTIPLE_THREAD";
- public final static String TARGET_KEY_MAX_CONCURRENT_THREAD_NUMBER
- = "MAX_CONCURRENT_THREAD_NUMBER";
-}
diff --git a/Tools/Java/Source/Common/org/tianocore/common/exception/EdkException.java b/Tools/Java/Source/Common/org/tianocore/common/exception/EdkException.java deleted file mode 100644 index 6d4fc52dae..0000000000 --- a/Tools/Java/Source/Common/org/tianocore/common/exception/EdkException.java +++ /dev/null @@ -1,49 +0,0 @@ -/*++
-
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-Module Name:
- EdkException.java
-
-Abstract:
-
---*/
-
-package org.tianocore.common.exception;
-
-public class EdkException extends Exception {
- static final long serialVersionUID = -8494188017252114029L;
-
- public static boolean isPrintStack = false;
-
- public EdkException(String message) {
- super("[EdkException]:" + message);
- }
-
- public EdkException(String message, boolean traceStack) {
- super(message);
-
- }
-
- public EdkException(){
- super();
- }
-
- public EdkException(Exception e, String message){
- super("[EdkException]:" + message);
- if (isPrintStack){
- this.setStackTrace(e.getStackTrace());
- }
- e.printStackTrace();
- }
- public static void setIsprintStack (boolean flag){
- isPrintStack = flag;
- }
-}
diff --git a/Tools/Java/Source/Common/org/tianocore/common/logger/DefaultLogger.java b/Tools/Java/Source/Common/org/tianocore/common/logger/DefaultLogger.java deleted file mode 100644 index b1d9d6de85..0000000000 --- a/Tools/Java/Source/Common/org/tianocore/common/logger/DefaultLogger.java +++ /dev/null @@ -1,44 +0,0 @@ -/*++
-
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-Module Name:
- DefaultLogger.java
-
-Abstract:
-
---*/
-
-package org.tianocore.common.logger;
-
-import java.io.File;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-class DefaultLogger implements LogMethod {
- private Logger logger = Logger.global;
- private static Level[] levelMap = {
- Level.SEVERE, Level.WARNING, Level.INFO, Level.FINE, Level.ALL
- };
-
- public DefaultLogger() {
- }
-
- public void putMessage(Object msgSource, int msgLevel, String msg) {
- if (msgLevel < 0 || msgLevel > levelMap.length) {
- msgLevel = 2;
- }
- logger.log(levelMap[msgLevel], msg);
- }
-
- public void flushToFile(File file){
-
- }
-}
\ No newline at end of file diff --git a/Tools/Java/Source/Common/org/tianocore/common/logger/EdkLog.java b/Tools/Java/Source/Common/org/tianocore/common/logger/EdkLog.java deleted file mode 100644 index 6b3ed95471..0000000000 --- a/Tools/Java/Source/Common/org/tianocore/common/logger/EdkLog.java +++ /dev/null @@ -1,112 +0,0 @@ -/*++
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- Module Name:
- EdkLogger.java
-
- Abstract:
-
- --*/
-package org.tianocore.common.logger;
-
-import java.io.File;
-
-public class EdkLog {
- public static final String always = "ALWAYS";
-
- public static final String error = "ERROR";
-
- public static final String warning = "WARNING";
-
- public static final String info = "INFO";
-
- public static final String verbose = "VERBOSE";
-
- public static final String debug = "DEBUG";
-
- public static final int EDK_ALWAYS = -1;
-
- public static final int EDK_ERROR = 0;
-
- public static final int EDK_WARNING = 1;
-
- public static final int EDK_INFO = 2;
-
- public static final int EDK_VERBOSE = 3;
-
- public static final int EDK_DEBUG = 4;
-
- private static int logLevel = EDK_INFO;
-
- private static LogMethod logger = new DefaultLogger();
-
- public static void log(int level, String message) {
- if (level <= logLevel) {
- logger.putMessage(null, level, message);
- }
- }
-
- public static void log(String message) {
- if (EDK_INFO <= logLevel) {
- logger.putMessage(null, EDK_INFO, message);
- }
- }
-
- public static void log(Object o, int level, String message) {
- if (level <= logLevel) {
- logger.putMessage(o, level, message);
- }
- }
-
- public static void log(Object o, String message) {
- if (EDK_INFO <= logLevel) {
- logger.putMessage(o, EDK_INFO, message);
- }
- }
-
- public static void flushLogToFile(File file) {
- logger.flushToFile(file);
- }
-
- public static void setLogger(LogMethod l) {
- logger = l;
- }
-
- public static void setLogLevel(int level) {
- logLevel = level;
- }
-
- public static void setLogLevel(String level) {
- if (level == null) {
- return;
- }
- String levelStr = level.trim();
- if (levelStr.equalsIgnoreCase(error)) {
- logLevel = EDK_ERROR;
- }
- if (levelStr.equalsIgnoreCase(debug)) {
- logLevel = EDK_DEBUG;
- }
- if (levelStr.equalsIgnoreCase(info)) {
- logLevel = EDK_INFO;
- }
- if (levelStr.equalsIgnoreCase(verbose)) {
- logLevel = EDK_VERBOSE;
- }
- if (levelStr.equalsIgnoreCase(warning)) {
- logLevel = EDK_WARNING;
- }
- }
-
- public static int getLogLevel() {
- return logLevel;
- }
-}
diff --git a/Tools/Java/Source/Common/org/tianocore/common/logger/LogMethod.java b/Tools/Java/Source/Common/org/tianocore/common/logger/LogMethod.java deleted file mode 100644 index f9a6802430..0000000000 --- a/Tools/Java/Source/Common/org/tianocore/common/logger/LogMethod.java +++ /dev/null @@ -1,27 +0,0 @@ -/*++
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- Module Name:
- LogMethod.java
-
- Abstract:
-
- --*/
-
-package org.tianocore.common.logger;
-
-import java.io.File;
-
-public interface LogMethod {
- public void putMessage(Object msgSource, int msgLevel, String msg);
-
- public void flushToFile(File file);
-}
|