Interface CLibrary

All Superinterfaces:
MachineCompatibilityAspect
All Known Implementing Classes:
CLibraries

public interface CLibrary extends MachineCompatibilityAspect

Models a C library for platforms that have multiple competing implementations.

Currently this means just Linux. We don't try to model the varying implementations of the Microsoft Visual C++ runtime because it's usually a bundled part of the app and is thus not relevant for modelling application compatibility. Other platforms tend to have a single C runtime implementation.

  • Method Details

    • fromOrNull

      static CLibrary fromOrNull(String name)
      Lower-cases the name parameter and then looks it up in the alias map.
      Parameters:
      name - The primary name or alias of an operating system. Case-insensitive.
      Returns:
      a member of the enum or null if not recognized.
      Throws:
      IllegalArgumentException - if name is blank.
    • from

      static CLibrary from(String name)
      Returns a C library from the alias map or throws UnrecognizedAliasException.
      Parameters:
      name - primary name or alias of the well known operating system. Case-insensitive.
      Returns:
      the C library enum value.
      Throws:
      IllegalArgumentException - if name is blank.
      UnrecognizedAliasException - if name isn't a known operating system name or alias (compared case insensitively).