Class ClangCaseToken

java.lang.Object
ghidra.app.decompiler.ClangToken
ghidra.app.decompiler.ClangCaseToken
All Implemented Interfaces:
ClangNode

public class ClangCaseToken extends ClangToken
A token representing a switch "case" label, or other constant not directly linked to data-flow. The token has an associated constant value and a data-type
  • Constructor Details

    • ClangCaseToken

      public ClangCaseToken(ClangNode par)
  • Method Details

    • isVariableRef

      public boolean isVariableRef()
      Overrides:
      isVariableRef in class ClangToken
      Returns:
      true if this token represents a variable (in source code)
    • getMinAddress

      public Address getMinAddress()
      Description copied from interface: ClangNode
      Get the smallest Program address associated with the code that this text represents
      Specified by:
      getMinAddress in interface ClangNode
      Overrides:
      getMinAddress in class ClangToken
      Returns:
      the smallest Address
    • getMaxAddress

      public Address getMaxAddress()
      Description copied from interface: ClangNode
      Get the biggest Program address associated with the code that this text represents
      Specified by:
      getMaxAddress in interface ClangNode
      Overrides:
      getMaxAddress in class ClangToken
      Returns:
      the biggest Address
    • getVarnode

      public Varnode getVarnode()
      Description copied from class: ClangToken
      Many tokens directly represent a variable in the data-flow
      Overrides:
      getVarnode in class ClangToken
      Returns:
      the variable (Varnode) associated with this token or null
    • getPcodeOp

      public PcodeOp getPcodeOp()
      Description copied from class: ClangToken
      Many tokens directly represent a pcode operator in the data-flow
      Overrides:
      getPcodeOp in class ClangToken
      Returns:
      the operation (PcodeOp) associated with this token or null
    • getHighVariable

      public HighVariable getHighVariable()
      Description copied from class: ClangToken
      Get the high-level variable associate with this token or null otherwise
      Overrides:
      getHighVariable in class ClangToken
      Returns:
      HighVariable
    • getHighSymbol

      public HighSymbol getHighSymbol(HighFunction highFunction)
      Description copied from class: ClangToken
      Get the symbol associated with this token or null otherwise. This token may be directly associated with the symbol or a reference, in which case the symbol is looked up in the containing HighFunction
      Overrides:
      getHighSymbol in class ClangToken
      Parameters:
      highFunction - is the function
      Returns:
      HighSymbol
    • getScalar

      public Scalar getScalar()
      Description copied from class: ClangToken
      If the token represents an underlying integer constant, return the constant as a Scalar. Otherwise return null.
      Overrides:
      getScalar in class ClangToken
      Returns:
      the Scalar that the token represents or null
    • getSwitchOp

      public PcodeOp getSwitchOp()
      Returns:
      the BRANCHIND PcodeOp that jumps to this label
    • decode

      public void decode(Decoder decoder, PcodeFactory pfactory) throws DecoderException
      Description copied from class: ClangToken
      Decode this token from the current position in an encoded stream
      Overrides:
      decode in class ClangToken
      Parameters:
      decoder - is the decoder for the stream
      pfactory - is used to look up p-code objects associated with the token
      Throws:
      DecoderException - for problems decoding the stream