Package ghidra.program.util

# Class CommentTypeUtils

java.lang.Object
ghidra.program.util.CommentTypeUtils

public class CommentTypeUtils extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CommentTypeUtils()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static CommentType`
  `getCommentType(CodeUnit cu, ProgramLocation loc, CommentType defaultCommentType)`
  Get the comment type from the current location.
  `static boolean`
  `isCommentAllowed(CodeUnit cu, ProgramLocation loc)`

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### CommentTypeUtils

    public CommentTypeUtils()

- ## Method Details

  - ### getCommentType

    public static CommentType getCommentType(CodeUnit cu, ProgramLocation loc, CommentType defaultCommentType)
    Get the comment type from the current location. If the cursor is not over a comment, then just return EOL as the default.
    Parameters:
      `cu` -
      `loc` -
      `defaultCommentType` -
    Returns:
      comment type or defaultCommentType if location does not correspond to a comment

  - ### isCommentAllowed

    public static boolean isCommentAllowed(CodeUnit cu, ProgramLocation loc)