For what it's worth, I've always used ~Support to indicate a class that is
used via delegation to fulfill the contract of an interface.

e.g.

interface XxxInterface
{
  public void a();
}

abstract class AbstractXxx
  implements XxxInterface
{
  public void a() { ...; }
}

class XxxSupport
// may extend AbstractXxx
{
  public void a() { ...; }
}

then you can do

class MyClass
  extends AbstractXxx
{
  ...
}

or

class MyClass
  implements XxxInterface
{
  private XxxSupport support = new XxxSupport();

  public void a() { support.a(); }
}


This is in the spirit of java.beans.PropertyChangeSupport.

   michael


On Tue, 17 Jun 2003, David Graham wrote:

> > > >I do not like the names of ~Support classes. ~Support or ~Helper
> >indicate
> > > >(for me)
> > > >that these are Helper classes with (often static) utility functions. In
> > > the
> > > >Java API I think
> > > >I have found the usage of Abstract~ or Base~ much more often for
> >classes
> > >
> > > You've missed an important difference between Helper classes and
> > > Base/Abstract classes.  Helper classes allow composition/reuse outside
> >of
> > > a
> > > class hierarchy.  Abstract class' methods can only be used by
> >subclasses.
> > >
> >
> >Thanks for expressing that much better than I could. So the ~Suppport
> >classes
> >_are_ Base/Abstract classes, since they are abstract and only used by
> >subclassing in Clazz, aren't they?
>
> I don't work on, nor use the Clazz package so I don't know the details.  I
> was making a statement about OOP design in general.  If the Clazz classes
> you're referring to are, in fact, abstract classes used in a class
> hierarchy, they should be named Abstract* or Base* to follow widely used
> Java naming conventions.
>
> David
>
> >
> >Victor
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _________________________________________________________________
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to