Package ghidra.program.model.lang

# Class CompilerSpecID

java.lang.Object
ghidra.program.model.lang.CompilerSpecID

All Implemented Interfaces:
  `Comparable<CompilerSpecID>`

public final class CompilerSpecID extends Object implements Comparable<CompilerSpecID>
Represents an opinion's compiler (gcc, borlandcpp, etc).

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `DEFAULT_ID`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CompilerSpecID(String id)`
  Creates a new compiler spec ID.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(CompilerSpecID o)`
  `boolean`
  `equals(Object obj)`
  `String`
  `getIdAsString()`
  Gets the compiler spec ID as a string.
  `int`
  `hashCode()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### DEFAULT_ID

    public static final String DEFAULT_ID
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### CompilerSpecID

    public CompilerSpecID(String id)
    Creates a new compiler spec ID.
    Parameters:
      `id` - The compiler ID (gcc, borlandcpp, etc) as defined in the appropriate `LanguageDescription`. If null the value of "default" will be assumed.

- ## Method Details

  - ### getIdAsString

    public String getIdAsString()
    Gets the compiler spec ID as a string.
    Returns:
      The compilers spec ID as a string.
    Throws:
      `IllegalArgumentException` - if the compiler spec ID is null or empty.

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### compareTo

    public int compareTo(CompilerSpecID o)
    Specified by:
      `compareTo` in interface `Comparable<CompilerSpecID>`