swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: creating objects


From: Paul E Johnson
Subject: Re: creating objects
Date: Fri, 27 Jul 2001 15:57:53 -0500

Myriam Abramson wrote:
> 
> Hi!
> 
> I'm using javaswarm and I'm still puzzling on creating objects in
> Swarm.
> 
> What is the difference between:
> 
> EZBinC ezbinCreating = new EZBinCImpl (new EZBinImpl ());
> ezbinCreating.createBegin(aZone);
> ...
> EZBin ezbin = (EZBin) ezbinCreating.createEnd();
> 
> and
> 
> simply
> EZBin ezbin = new EZBinImpl(aZone);
> 
> Thanks for some clarification.
>                                     myriam
I was working on a Java subclassing guide at one time. The difference in
the two is that the latter assumes "default" create-time settings, while
the former allows user-customization of the create phase.  If you need
an overview of the phase ideas, please see the User Guide, where the
beginning of part II discusses the phases.
 
The customization requires a somewhat complicated schema, and Marcus has
worked hard to design constructors that take enough arguments so that
you don't have to do the customization yourself.

I can't find the guide I had started, but I did find this old email from
January I wrote to Swarm support (January 25, 2001), so I'm sure I don't
just imagine having worked on this:
"Just to make sure I understand, is this right: many Impl classes have
create() methods (constructors) that allow the user to pass through all
of the arguments that would be needed separate steps of the create-phase
(CImpl), so no separate use of CImpl is necessary.  WHen a create method
is called, the Swarm libraries hide the separate calls to CImpl and
SImpl.  The separate usage of CImpl is necessary only when an obj-c
class has create-phase methods that are not rolled into the create()
method, as was the case with the Arguments example."
-- 
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]