On 1/11/02 6:37 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> dlr         02/01/11 15:37:56
> 
> Modified:    src/java/org/apache/stratum/xo Mapper.java
> Log:
> o Removed use of basePackage -- it made too many assumptions about how
> the class hierarchy is structured.  With it, child elements had to be
> in the same package as their parent.

Why did you do that? That's one of the whole tenets of this class is that
the simple case works. For a small object model the classes will be in the
same package. I certainly don't mind the addition of logic to handle what
you wanted for the pipeline, but you i) didn't discuss anything ii) you
broke the testbed. What you removed I think is a real convenience, you could
have added your more sophisticated behavior overtop of what was there.

> 
> o Add CLASS_NAME constant to create hook for knowing what Class type a
> XML entity is supposed to correspond to.  Employeed hook in map() and
> treeWalk().

Cool, +1
 
> o Consolidated debugging for addObject() and setProperties().
> 
> o Added elementClassName() method for use in discovering the class
> name of a nested element (and allowing the removal the the "same
> package" assumption).

A big fat -1, the torque object model can be rather complicated and it fits
perfectly fine in a single package.
 
> o Improved interface to inclusion() method, removing unnecessary
> paremeters.
> 
> o Renamed elementToClassName() to makeMethodName().  As its
> assumptions about package structure didn't hold, it's now used only to
> generate the name of the method used to add objects to a parent bean.

The assumption definitely holds as one simple, one moderately complicated
model (Torque), and one pretty complicated model (Maven) all worked under
this assumption and as the tests showed the assumption works fine. Like I
said additional complexity is fine, but there's no reason to remove handling
for simple and commons cases.

I will put the behaviour back as I've already made changes to make the class
work with InputStreams so it can deal with resources in the filesystem and
the classpath.
 
-- 

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons



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

Reply via email to