H2ONaCl
H2ONaCl

Reputation: 11279

How do I identify instances in Javadoc or pseudo code?

I am tempted to write something as follows:

StringBuilder.append(String.format("%d %f", x, y));

But, I know that I am really working with an instance of StringBuilder and I do not mean to be invoking a static append method. Is there a commonly practiced way of writing such Javadoc or pseudo code?

Upvotes: 1

Views: 307

Answers (1)

Paŭlo Ebermann
Paŭlo Ebermann

Reputation: 74760

I like to write StringBuilder#append(...) here to indicate that this is an instance method to be called on an instance of StringBuilder, not a class (static) method, contrasting to a class method like String.valueOf(...).

I'm not sure there is a definite convention about this, though.

Upvotes: 2

Related Questions