classType

Coverity Documentation

Version
latest

Matches all kinds of C# class types.

This pattern matches the following kinds of C# classes:

  • class
  • delegate
  • enum – only in .NET bytecode
  • interface
  • struct

This pattern only matches nodes of type type.

Properties

classType produces a record that contains the following properties:

Name Type Description
isAnonymous bool true if the class is anonymous
isComplete bool true if the class is complete.
kind enum The kind of class, one of `class`, `delegate`, `enum`, `interface`, or `struct`
location location The location information of the class
qualifiedName string The name of the class including the class's package
scopeList list<string> The scope of the class. This is the elements of the qualified name broken up into a list.
simpleName string The name of the class, without the package prefix

Example

The following CodeXM pattern matches all delegate classes:


CXM code follows
    c matches classType { .kind = `delegate` };