com.genexus.platform.NativeFunctions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gxclassR Show documentation
Show all versions of gxclassR Show documentation
Core classes for the runtime used by Java and Android apps generated with GeneXus
package com.genexus.platform;
import com.genexus.CommonUtil;
public class NativeFunctions
{
private volatile static INativeFunctions instance;
private static Boolean isMicrosoft;
private NativeFunctions()
{
}
public static boolean isWindows()
{
return CommonUtil.isWindows();
}
public static boolean isUnix()
{
return !isWindows();
}
private static Object handleLock = new Object();
public static INativeFunctions getInstance()
{
if (instance == null)
{
synchronized (handleLock)
{
if (instance == null)
{
try
{
instance = (INativeFunctions) Class.forName("com.genexus.platform.NativeFunctions11").newInstance();
}
catch (ClassNotFoundException e)
{
System.err.println("ClassNotFound " + e.getMessage());
}
catch (IllegalAccessException e)
{
System.err.println("ClassNotFound " + e.getMessage());
}
catch (InstantiationException e)
{
System.err.println("ClassNotFound " + e.getMessage());
}
}
}
}
return instance;
}
public static void endNativeFunctions()
{
instance = null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy