concept public api in category java

appears as: public API, public APIs, public API, Public APIs
JUnit in Action

This is an excerpt from Manning's book JUnit in Action.

Using black-box testing, we can create tests that cover the public API of an application. Because we are using documentation—not knowledge of the implementation—as our guide, we do not create tests that use special parameter values to exercise special conditions in the code, for example.

The Java Module System

This is an excerpt from Manning's book The Java Module System.

A module the.name { } block defines a module. The name typically follows the package-naming convention: it should be globally unique by reverting a domain name, it’s all lowercase, and sections are separated by dots (see section 3.1.3 for more—I use shorter names only to make them more amenable for this book). Inside the module block, requires directives express the dependencies between modules, and exports directives define each module’s public API by naming the packages whose public types are to be exported.

To understand how accessibility shapes a module’s public API, it’s important to understand that term first: what is the public API?

JUnit in Action, Second Edition

This is an excerpt from Manning's book JUnit in Action, Second Edition.

5.2.1. Public APIs are contracts

One of the principles in providing backward-compatible software states says that you “never change the signature of a public method.” An application code review will show that most calls are made to public APIs. If you change the signature of a public method, then you need to change every call site in the application and unit tests. Even with refactoring wizards in tools like Eclipse, you must always perform this task with care.