This page will look better in a graphical browser that supports web standards, but is accessible to any browser or internet device.

Served by Samwise.

JSim Source Code Standards

This page is for the current JSim version 2.0. Click here for the earlier JSim 1.6 version.


This document describes coding standards for JSim Java source code. It is intended for those contributing Java source code to the JSim CVS archive. JSim is a large program (currently about 80,000 lines), so ensuring some uniformity of appearance is very helpful to those who must read and understand the code.

Since the present author (Erik Butterworth) wrote about 95% of the existing code, the coding conventions described here are I follow. I do not to claim these to be the best of all possible conventions, only that by following these conventions, JSim's code base will be more consistent, and therefore more readable.

This a my first try at this document. It will, no doubt, evolve over time. Sun has done some nice work on Java conventions. I urge readers to consider that document, which is much more complete that this one here. I do differ in some particulars, however. Ultimately, JSim coding conventions will always be some blend of standard conventions and JSim-specific conventions.

JSim Source Code Conventions

General conventions:

Format and Indenting


JSim-specific conventions

Comments or Questions?

[This page was last modified 06Jul12, 3:05 pm.]

Model development and archiving support at provided by the following grants: NIH U01HL122199 Analyzing the Cardiac Power Grid, 09/15/2015 - 05/31/2020, NIH/NIBIB BE08407 Software Integration, JSim and SBW 6/1/09-5/31/13; NIH/NHLBI T15 HL88516-01 Modeling for Heart, Lung and Blood: From Cell to Organ, 4/1/07-3/31/11; NSF BES-0506477 Adaptive Multi-Scale Model Simulation, 8/15/05-7/31/08; NIH/NHLBI R01 HL073598 Core 3: 3D Imaging and Computer Modeling of the Respiratory Tract, 9/1/04-8/31/09; as well as prior support from NIH/NCRR P41 RR01243 Simulation Resource in Circulatory Mass Transport and Exchange, 12/1/1980-11/30/01 and NIH/NIBIB R01 EB001973 JSim: A Simulation Analysis Platform, 3/1/02-2/28/07.