Public Methods is one of the source-code metrics Understand computes across 17+ languages — browse them in the GUI, export and track them, or script them with the Python API.
Public Methods
API ID: CountDeclMethodPublicAlso Known As: Number of Public Methods (PM, NPM)
Languages: Basic, C#, C++, Java, Pascal, Web
Targets: Architectures, Classes, Files, Modules, Project
Number of local (not inherited) public methods.
Also known as Lorenz & Kidd - Number of Public Methods (PM, NPM).
- Basic: Project, Module, Class, Struct
- C#: Project, Class, Struct
- C++: Project, Class, Struct, Union
- Java: Project, File, Class, Interface
- Pascal: Project, Class, Interface
- Web: Project, PHP Class, PHP Interface
- For projects and architectures, this metric must also be enabled from "Project Configuration/Metrics/Projects and Architectures" with the "Show aggregated class metrics" option. Enabling this option can be time consuming.
- This metric can be disabled from "Project Configuration/Metrics/Object Orientated" with the "Show method and variable count metrics" option.