cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Michels <step...@apache.org>
Subject RE: Defining Source Interfaces
Date Wed, 08 Jan 2003 14:46:33 GMT


> > And as far as code cleanliness is concerned, an "instanceof" test seems
> > more OOP to me than a isTraversable() method that tells us if is we have
> > the right to use getParent() and getChildren(). With a separate
> > interface, these methods do not exist if they do not make sense.
> >
> This is a point were a not really agree with. If I always have to do
> instanceof tests and class casts, something is wrong with OOP then in my
> eyes.

I'll hope not ... ;-)

> fgrep -n "instanceof"
xml-cocoon2/src/java/org/apache/cocoon/components/LifecycleHelper.java
212:        if( component instanceof LogEnabled )
240:        if( null != context && component instanceof Contextualizable )
245:        if( null != componentManager && component instanceof
Composable )
250:        if( null != roles && component instanceof RoleManageable )
255:        if( null != logkit && component instanceof LogKitManageable )
260:        if( null != configuration && component instanceof Configurable
)
265:        if( null != configuration && component instanceof
Parameterizable )
271:        if( initializeAndStart && component instanceof Initializable )
276:        if( initializeAndStart && component instanceof Startable )
291:        if( component instanceof Startable )
304:        if ( component instanceof Disposable )

Stephan Michels.


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message