1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 package software.amazon.awssdk.crt; 7 8 import software.amazon.awssdk.crt.utils.PackageInfo; 9 10 public abstract class CrtPlatform { 11 // Called before any native code is loaded, just to configure the JVM jvmInit()12 public void jvmInit() {} 13 14 // Gets the package version. If not overridden, the Java Package that the 15 // CRT class is in will be read for version info. getVersion()16 public PackageInfo.Version getVersion() { 17 return null; 18 } 19 20 // Get the OS identifier, used to determine platform and to load the 21 // JNI library getOSIdentifier()22 public String getOSIdentifier() { 23 return System.getProperty("os.name"); 24 } 25 26 // Get the architecture, used to determine platform and to load the 27 // JNI library getArchIdentifier()28 public String getArchIdentifier() { 29 return System.getProperty("os.arch"); 30 } 31 32 // Get the library resource path to load the JNI library getResourcePath(String cRuntime, String libraryName)33 public String getResourcePath(String cRuntime, String libraryName) throws RuntimeException { 34 return null; 35 } 36 37 // Called one and only one time during setup for testing setupOnce()38 public void setupOnce() {} 39 40 // Called before every JUnit test testSetup(Object context)41 public void testSetup(Object context) {} 42 43 // Called after every JUnit test testTearDown(Object context)44 public void testTearDown(Object context) {} 45 } 46