Package ghidra.program.model.lang
Class LanguageCompilerSpecPair
- java.lang.Object
 - 
- ghidra.program.model.lang.LanguageCompilerSpecPair
 
 
- 
- All Implemented Interfaces:
 java.lang.Comparable<LanguageCompilerSpecPair>
public final class LanguageCompilerSpecPair extends java.lang.Object implements java.lang.Comparable<LanguageCompilerSpecPair>
Represents an opinion's processor language and compiler.- See Also:
 LanguageID,CompilerSpecID
 
- 
- 
Field Summary
Fields Modifier and Type Field Description CompilerSpecIDcompilerSpecIDLanguageIDlanguageID 
- 
Constructor Summary
Constructors Constructor Description LanguageCompilerSpecPair(LanguageID languageID, CompilerSpecID compilerSpecID)Creates a new language and compiler pair.LanguageCompilerSpecPair(java.lang.String languageID, java.lang.String compilerSpecID)Creates a new language and compiler pair. 
- 
Method Summary
 
 - 
 
- 
- 
Field Detail
- 
languageID
public final LanguageID languageID
 
- 
compilerSpecID
public final CompilerSpecID compilerSpecID
 
 - 
 
- 
Constructor Detail
- 
LanguageCompilerSpecPair
public LanguageCompilerSpecPair(java.lang.String languageID, java.lang.String compilerSpecID)Creates a new language and compiler pair.- Parameters:
 languageID- The language ID string (x86:LE:32:default, 8051:BE:16:default, etc).compilerSpecID- The compiler spec ID string (gcc, borlandcpp, etc).- Throws:
 java.lang.IllegalArgumentException- if the language or compiler ID strings are null or empty.
 
- 
LanguageCompilerSpecPair
public LanguageCompilerSpecPair(LanguageID languageID, CompilerSpecID compilerSpecID)
Creates a new language and compiler pair.- Parameters:
 languageID- The language ID.compilerSpecID- The compiler spec ID.- Throws:
 java.lang.IllegalArgumentException- if the language or compiler ID is null.
 
 - 
 
- 
Method Detail
- 
getLanguage
public Language getLanguage() throws LanguageNotFoundException
Gets theLanguagefor this object'sLanguageID.- Returns:
 - The 
Languagefor this object'sLanguageID. - Throws:
 LanguageNotFoundException- if noLanguagecould be found for this object'sLanguageID.
 
- 
getCompilerSpec
public CompilerSpec getCompilerSpec() throws CompilerSpecNotFoundException, LanguageNotFoundException
Gets theCompilerSpecfor this object'sCompilerSpecID.- Returns:
 - The 
CompilerSpecfor this object'sCompilerSpecID. - Throws:
 LanguageNotFoundException- if noLanguagecould be found for this object'sLanguageID.CompilerSpecNotFoundException- if noCompilerSpeccould be found for this object'sCompilerSpecID.
 
- 
getLanguage
public Language getLanguage(LanguageService languageService) throws LanguageNotFoundException
Gets theLanguagefor this object'sLanguageID, using the given language service to do the lookup.- Parameters:
 languageService- The language service to use for language lookup.- Returns:
 - The 
Languagefor this object'sLanguageID, using the given language service to do the lookup. - Throws:
 LanguageNotFoundException- if noLanguagecould be found for this object'sLanguageIDusing the given language service.
 
- 
getCompilerSpec
public CompilerSpec getCompilerSpec(LanguageService languageService) throws CompilerSpecNotFoundException, LanguageNotFoundException
Gets theCompilerSpecfor this object'sCompilerSpecID, using the given language service to do the lookup.- Parameters:
 languageService- The language service to use for compiler lookup.- Returns:
 - The 
CompilerSpecfor this object'sCompilerSpecID, using the given language service to do the lookup. - Throws:
 LanguageNotFoundException- if noLanguagecould be found for this object'sLanguageIDusing the given language service.CompilerSpecNotFoundException- if noCompilerSpeccould be found for this object'sCompilerSpecIDusing the given language service.
 
- 
getLanguageDescription
public LanguageDescription getLanguageDescription() throws LanguageNotFoundException
Gets theLanguageDescriptionfor this object'sLanguageID.- Returns:
 - The 
LanguageDescriptionfor this object'sLanguageID. - Throws:
 LanguageNotFoundException- if noLanguageDescriptioncould be found for this object'sLanguageID.
 
- 
getCompilerSpecDescription
public CompilerSpecDescription getCompilerSpecDescription() throws LanguageNotFoundException, CompilerSpecNotFoundException
Gets theCompilerSpecDescriptionfor this object'sCompilerSpecID.- Returns:
 - The 
CompilerSpecDescriptionfor this object'sCompilerSpecID. - Throws:
 LanguageNotFoundException- if noLanguageDescriptioncould be found for this object'sLanguageID.CompilerSpecNotFoundException- if noCompilerSpecDescriptioncould be found for this object'sCompilerSpecID.
 
- 
getLanguageDescription
public LanguageDescription getLanguageDescription(LanguageService languageService) throws LanguageNotFoundException
Gets theLanguageDescriptionfor this object'sLanguageID.- Parameters:
 languageService- The language service to use for description lookup.- Returns:
 - The 
LanguageDescriptionfor this object'sLanguageID. - Throws:
 LanguageNotFoundException- if noLanguageDescriptioncould be found for this object'sLanguageIDusing the given language service.
 
- 
getCompilerSpecDescription
public CompilerSpecDescription getCompilerSpecDescription(LanguageService languageService) throws LanguageNotFoundException, CompilerSpecNotFoundException
Gets theCompilerSpecDescriptionfor this object'sCompilerSpecID.- Parameters:
 languageService- The language service to use for description lookup.- Returns:
 - The 
CompilerSpecDescriptionfor this object'sCompilerSpecID. - Throws:
 LanguageNotFoundException- if noLanguageDescriptioncould be found for this object'sLanguageID.CompilerSpecNotFoundException- if noCompilerSpecDescriptioncould be found for this object'sCompilerSpecIDusing the given language service.
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
equals
public boolean equals(java.lang.Object obj)
- Overrides:
 equalsin classjava.lang.Object
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
- 
compareTo
public int compareTo(LanguageCompilerSpecPair o)
- Specified by:
 compareToin interfacejava.lang.Comparable<LanguageCompilerSpecPair>
 
 - 
 
 -