StatusCode and Handle

The StatusCode class has the same interest in Java that it had in the C++ world: it encapsulates a status and allow to query whether the operation is success or not. The interesting part of its Java definition is shown on Listing 1.2.


\begin{lstlisting}[style=JavaListing, caption=Definition of class StatusCode and...
...Handle SUCCESS = new Handle(1, null);
public Object object;
};
\end{lstlisting}

Besides StatusCode, a new return type has been defined that extends it by adding a member of class Object. This allows a function to return at the same time the status and the return value. This new type was called Handle. The Handle class is heavily used in the IBookkeepingInfo and IBookkeepingEditor interfaces.



Sebastien Ponce 2004-03-12