Class CompilerType

java.lang.Object
com.pnfsoftware.jeb.util.base.DynamicEnum<CompilerType>
com.pnfsoftware.jeb.core.units.codeobject.CompilerType

@Ser public class CompilerType extends DynamicEnum<CompilerType>
Dynamic enumeration of common compiler types.
See Also:
  • Field Details

    • map

      protected static LinkedHashMap<String,CompilerType> map
      Registered compiler types.
    • UNKNOWN

      public static final CompilerType UNKNOWN
      unknown compiler
    • GCC

      public static final CompilerType GCC
      GCC, generic
    • MSVC

      public static final CompilerType MSVC
      Microsoft Visual Studio, generic
    • builtinCount

      public static final int builtinCount
      Number of built-in compiler types.
  • Constructor Details

    • CompilerType

      protected CompilerType(int id, String name)
  • Method Details

    • ordinal

      public int ordinal()
      Description copied from class: DynamicEnum
      Get this entry's current ordinal in its dynamic enum.
      Specified by:
      ordinal in class DynamicEnum<CompilerType>
      Returns:
      current ordinal of this entry
    • count

      public static int count()
      Get number of registered compiler types.
      Returns:
      number of registered compiler types
    • values

      public static Collection<CompilerType> values()
      Get registered compiler types.
      Returns:
      registered compiler types
    • valueOf

      public static CompilerType valueOf(String name)
      Retrieve a compiler type by name.
      Parameters:
      name - compiler type name
      Returns:
      matching compiler type, or UNKNOWN
    • valueOf

      public static CompilerType valueOf(int id)
      Retrieve a compiler type by id.
      Parameters:
      id - compiler type id
      Returns:
      matching compiler type, or UNKNOWN
    • register

      public static CompilerType register(int id, String name)
      Register a compiler type.
      Parameters:
      id - compiler type id
      name - compiler type name
      Returns:
      registered compiler type
    • unregister

      public static boolean unregister(String name)
      Unregister a dynamic compiler type.
      Parameters:
      name - compiler type name
      Returns:
      true if the type was unregistered