You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Leif Mortenson <le...@tanukisoftware.com> on 2002/04/22 08:47:22 UTC

Commit: Simplified use of AbstractInstrumentable.

I modified the AbstractInstrumentable class so that the Instrumentable
methods no longer
need to be implemented by classes wishing to implement Instrumentable.
The Instruments
and child Instrumentables are now registered using utility methods:
addInstrument and
addChildInstrumentable. This makes code like the following possible in
the constructor:

public UserClass() {
// Initialize the Instruments
addInstrument(m_loadTime = new ValueInstrument("load-time"));
}

Much easier. But anyone using the AbstractInstrumentable or
AbstractLogEnabledInstrumentable classes right now are going to have to
modify their
code. An easy change. But sorry for the hassle.

Let me know if you have any comments,

Cheers,
Leif


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Commit: Simplified use of AbstractInstrumentable.

Posted by Ryan Shaw <ry...@stanfordalumni.org>.
Nice, much more elegant.

Leif Mortenson wrote:

> I modified the AbstractInstrumentable class so that the Instrumentable
> methods no longer
> need to be implemented by classes wishing to implement Instrumentable.
> The Instruments
> and child Instrumentables are now registered using utility methods:
> addInstrument and
> addChildInstrumentable. This makes code like the following possible in
> the constructor:
> 
> public UserClass() {
> // Initialize the Instruments
> addInstrument(m_loadTime = new ValueInstrument("load-time"));
> }
> 
> Much easier. But anyone using the AbstractInstrumentable or
> AbstractLogEnabledInstrumentable classes right now are going to have to
> modify their
> code. An easy change. But sorry for the hassle.
> 
> Let me know if you have any comments,
> 
> Cheers,
> Leif
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>