com.genexus.specific.java.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.specific.java;
import com.genexus.common.interfaces.IExtensionNativeFunctions;
import com.genexus.platform.INativeFunctions;
import com.genexus.util.IThreadLocal;
import com.genexus.util.IThreadLocalInitializer;
public class NativeFunctions implements IExtensionNativeFunctions {
@Override
public IThreadLocal newThreadLocal(IThreadLocalInitializer initializer) {
return new InheritableThreadLocalSun(initializer);
}
class InheritableThreadLocalSun extends ThreadLocal implements com.genexus.util.IThreadLocal
{
private IThreadLocalInitializer initializer;
public InheritableThreadLocalSun()
{
}
public InheritableThreadLocalSun(IThreadLocalInitializer initializer)
{
this.initializer = initializer;
}
@SuppressWarnings("unchecked")
public Object get()
{
Object obj = super.get();
if(obj == null && initializer != null)
{
set(initializer.initialValue());
return super.get();
}
return obj;
}
}
@Override
public INativeFunctions getInstance() {
return com.genexus.platform.NativeFunctions.getInstance();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy