As Java developers, we talk a lot about methods of classes and interfaces. We talk about types of methods like get and set methods, command methods, and factory methods. Next to classifying methods by purpose, we also talk about properties of methods like being a primitive or composed method, a hook or template method, a class or instance method, or a convenience method.
Obviously, we have a large vocabulary for talking about method types and method properties. We use this vocabulary to communicate and document different aspects of a method, for example, what it is good for, who may use it, and how it is implemented. Understanding this vocabulary is key to fast and effective communication among developers.
This article presents seven key method properties that we use in our daily design and programming work. It illustrates them using examples from the JDK and other sources and catalogs them for use as part of a shared vocabulary. Some of the method properties have their own naming convention. Mastering this vocabulary helps us better implement our methods, better document our classes and interfaces, and communicate more effectively.
Dirk Riehle. "Method Properties in Java." Java Report 5, 5 (May 2000). Page 62pp.
For the time being, a copy is available as a PDF file.
Copyright (©) 1999, 2000 by Dirk Riehle and SIGS Publications. All Rights Reserved.