Tabnine Logo
Platform$OS.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
jnr.ffi.Platform$OS

Best Java code snippets using jnr.ffi.Platform$OS.toString (Showing top 3 results out of 315)

origin: com.cloudbees.util/jnr-unixsocket-nodep

private static NativeType[] buildNativeTypeAliases() {
  Platform platform = Platform.getNativePlatform();
  Package pkg = NativeRuntime.class.getPackage();
  String cpu = platform.getCPU().toString();
  String os = platform.getOS().toString();
  EnumSet<TypeAlias> typeAliases = EnumSet.allOf(TypeAlias.class);
  NativeType[] aliases = {};
  Class cls;
  try {
    cls = Class.forName(pkg.getName() + ".platform." + cpu + "." + os + ".TypeAliases");
    Field aliasesField = cls.getField("ALIASES");
    Map aliasMap = Map.class.cast(aliasesField.get(cls));
    aliases = new NativeType[typeAliases.size()];
    for (TypeAlias t : typeAliases) {
      aliases[t.ordinal()] = (NativeType) aliasMap.get(t);
      if (aliases[t.ordinal()] == null) {
        aliases[t.ordinal()] = NativeType.VOID;
      }
    }
  } catch (ClassNotFoundException cne) {
    Logger.getLogger(NativeRuntime.class.getName()).log(Level.SEVERE, "failed to load type aliases: " + cne);
  } catch (NoSuchFieldException nsfe) {
    Logger.getLogger(NativeRuntime.class.getName()).log(Level.SEVERE, "failed to load type aliases: " + nsfe);
  } catch (IllegalAccessException iae) {
    Logger.getLogger(NativeRuntime.class.getName()).log(Level.SEVERE, "failed to load type aliases: " + iae);
  }
  return aliases;
}
origin: io.prestosql.cassandra/cassandra-driver

private static NativeType[] buildNativeTypeAliases() {
  Platform platform = Platform.getNativePlatform();
  Package pkg = NativeRuntime.class.getPackage();
  String cpu = platform.getCPU().toString();
  String os = platform.getOS().toString();
  EnumSet<TypeAlias> typeAliases = EnumSet.allOf(TypeAlias.class);
  NativeType[] aliases = {};
  Class cls;
  try {
    cls = Class.forName(pkg.getName() + ".platform." + cpu + "." + os + ".TypeAliases");
    Field aliasesField = cls.getField("ALIASES");
    Map aliasMap = Map.class.cast(aliasesField.get(cls));
    aliases = new NativeType[typeAliases.size()];
    for (TypeAlias t : typeAliases) {
      aliases[t.ordinal()] = (NativeType) aliasMap.get(t);
      if (aliases[t.ordinal()] == null) {
        aliases[t.ordinal()] = NativeType.VOID;
      }
    }
  } catch (ClassNotFoundException cne) {
    Logger.getLogger(NativeRuntime.class.getName()).log(Level.SEVERE, "failed to load type aliases: " + cne);
  } catch (NoSuchFieldException nsfe) {
    Logger.getLogger(NativeRuntime.class.getName()).log(Level.SEVERE, "failed to load type aliases: " + nsfe);
  } catch (IllegalAccessException iae) {
    Logger.getLogger(NativeRuntime.class.getName()).log(Level.SEVERE, "failed to load type aliases: " + iae);
  }
  return aliases;
}
origin: com.facebook.presto.cassandra/cassandra-driver

private static NativeType[] buildNativeTypeAliases() {
  Platform platform = Platform.getNativePlatform();
  Package pkg = NativeRuntime.class.getPackage();
  String cpu = platform.getCPU().toString();
  String os = platform.getOS().toString();
  EnumSet<TypeAlias> typeAliases = EnumSet.allOf(TypeAlias.class);
  NativeType[] aliases = {};
  Class cls;
  try {
    cls = Class.forName(pkg.getName() + ".platform." + cpu + "." + os + ".TypeAliases");
    Field aliasesField = cls.getField("ALIASES");
    Map aliasMap = Map.class.cast(aliasesField.get(cls));
    aliases = new NativeType[typeAliases.size()];
    for (TypeAlias t : typeAliases) {
      aliases[t.ordinal()] = (NativeType) aliasMap.get(t);
      if (aliases[t.ordinal()] == null) {
        aliases[t.ordinal()] = NativeType.VOID;
      }
    }
  } catch (ClassNotFoundException cne) {
    Logger.getLogger(NativeRuntime.class.getName()).log(Level.SEVERE, "failed to load type aliases: " + cne);
  } catch (NoSuchFieldException nsfe) {
    Logger.getLogger(NativeRuntime.class.getName()).log(Level.SEVERE, "failed to load type aliases: " + nsfe);
  } catch (IllegalAccessException iae) {
    Logger.getLogger(NativeRuntime.class.getName()).log(Level.SEVERE, "failed to load type aliases: " + iae);
  }
  return aliases;
}
jnr.ffiPlatform$OStoString

Popular methods of Platform$OS

  • equals
  • name

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • String (java.lang)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now