{"id":16086828,"url":"https://github.com/olekscode/visibilitydeductor","last_synced_at":"2026-01-18T17:32:54.349Z","repository":{"id":88081681,"uuid":"378661509","full_name":"olekscode/VisibilityDeductor","owner":"olekscode","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-20T00:04:33.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T14:43:44.307Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Smalltalk","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olekscode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-20T14:11:49.000Z","updated_at":"2021-08-20T00:04:36.000Z","dependencies_parsed_at":"2023-05-18T05:00:15.291Z","dependency_job_id":null,"html_url":"https://github.com/olekscode/VisibilityDeductor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/olekscode/VisibilityDeductor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olekscode%2FVisibilityDeductor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olekscode%2FVisibilityDeductor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olekscode%2FVisibilityDeductor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olekscode%2FVisibilityDeductor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olekscode","download_url":"https://codeload.github.com/olekscode/VisibilityDeductor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olekscode%2FVisibilityDeductor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28544807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T14:59:57.589Z","status":"ssl_error","status_checked_at":"2026-01-18T14:59:46.540Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T13:25:27.349Z","updated_at":"2026-01-18T17:32:54.333Z","avatar_url":"https://github.com/olekscode.png","language":"Smalltalk","readme":"# VisibilityDeductor\n\n![Build status](https://github.com/olekscode/VisibilityDeductor/workflows/CI/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/olekscode/VisibilityDeductor/badge.svg?branch=master)](https://coveralls.io/github/olekscode/VisibilityDeductor?branch=master)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/olekscode/VisibilityDeductor/master/LICENSE)\n\nMany modern programming languages do not have visibility specifiers (a.k.a access specifiers) such as `public`, `private`, or `protected`. However, even though they can not be marked as private at language level, some methods or classes in software libraries are only meant for the internal use and are not supposed to be used by clients. For the tools that analyse the API of software libraries, it can be useful to \"infer\" the visibility of methods or classes even if it is not defined explicitly. This repository contains a simple package that can deduce the visibility of packages, classes, and methods in [Pharo](https://pharo.org/) programming language.\n\n## How does it work?\n\n### Packages that can be considered private\n\n* **Test packages** - contain unit tests and mock classes used for testing. They are not meant to be reused by clients.\n  * When split by `-`, the package name contains the word `Test` or `Tests` (e.g., `Files-Tests`, `Fuel-Tests-Core`)\n* **Example packages** - contain examples of how to use specific functionality. Examples only exist for demonstration purposes and are not meant to be reused.\n  * Package name ends with `-Example` or `-Examples` (e.g., `Athens-Examples`, `Clap-Examples`)\n* **Baseline packages** - define the baselines of project (specify which packages belong to the project and how to load the dependencies).\n  * Package name begins with `BaselineOf` (e.g., `BaselineOfBasicTools`)\n* **Help packages** - define documentation pages\n  * Package name ends with `-Help` (e.g., `Pharo-Help`, `FreeType-Help`)\n\n### Classes that can be considered private\n\n* **Classes that belong to a package which can be considered private**\n* **Test classes** - define unit tests (note that tests classes may be located outside test packages)\n  * Class inherits from `TestCase`\n* **Example classes** - contain examples of how to use specific functionality\n  * Class name begins or ends with a word `Example` (e.g., `CheckBoxExample`, `ExampleSlotWithState`)\n* **Baseline classes** - classes that define the baselines projects\n  * Class inherits from `BaselineOf`\n* **Help classes** - define documentation pages\n  * Class inherits from `CustomHelp` or `CustomHelp2`\n\n### Methods that can be considered private\n\n* **Method that belong to a class which can be considered private**\n* **Methods that belong to a private protocol**\n  * Protocol of the method contains a substring `private` (e.g., `private`, `private - primitives`, `evaluating-private`)\n* **Example methods** - contain examples of how to use specific functionality\n  * Method name begins with `example` or ends with either `Example` or `Example*` where `*` represents a number (e.g. `examplePrintf`, `example42`, `annotationExample3`, `menuActivationExample`)\n\n## How to install it?\n\nTo install `VisibilityDeductor`, go to the Playground (Ctrl+OW) in your [Pharo](https://pharo.org/) image and execute the following Metacello script (select it and press Do-it button or Ctrl+D):\n\n```Smalltalk\nMetacello new\n  baseline: 'VisibilityDeductor';\n  repository: 'github://olekscode/VisibilityDeductor/src';\n  load.\n```\n\n## How to depend on it?\n\nIf you want to add a dependency on `VisibilityDeductor` to your project, include the following lines into your baseline method:\n\n```Smalltalk\nspec\n  baseline: 'VisibilityDeductor'\n  with: [ spec repository: 'github://olekscode/VisibilityDeductor/src' ].\n```\n\nIf you are new to baselines and Metacello, check out the [Baselines](https://github.com/pharo-open-documentation/pharo-wiki/blob/master/General/Baselines.md) tutorial on Pharo Wiki.\n\n## How to use it?\n\n```Smalltalk\ndeductor := VisibilityDeductor new.\n\ndeductor isMethodPublic: Collection \u003e\u003e #do:. \"true\"\ndeductor isMethodPrivate: Collection \u003e\u003e #do:. \"false\"\ndeductor isMethodPrivate: Collection \u003e\u003e #emptyCheck. \"true (because it's in a 'private' protocol)\"\ndeductor isMethodPrivate: CollectionTest \u003e\u003e #testCopyWithoutDuplicates. \"true\"\ndeductor isMethodPrivate: StringTest \u003e\u003e #setUp. \"true\"\n\ndeductor isClassPublic: AthensSurfaceExamples. \"false\"\ndeductor isClassPrivate: AthensSurfaceExamples. \"true\"\ndeductor isClassPrivate: AnnouncementsHelp \"true\".\n\ndeductor isPackagePublic: 'RPackage-Tests' asPackage. \"false\"\ndeductor isPackagePrivate: 'RPackage-Tests' asPackage. \"true\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folekscode%2Fvisibilitydeductor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folekscode%2Fvisibilitydeductor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folekscode%2Fvisibilitydeductor/lists"}