Berin,

----- Original Message -----
From: "Berin Loritsch" <[EMAIL PROTECTED]>
To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>
Sent: Sunday, October 27, 2002 8:05 PM
Subject: Re: [clazz] Clazz API mock-up


> Dmitri Plotnikov wrote:
> > Please check out the two attached classes: Clazz and Field. These are
client
> > APIs only.  Nothing is said about where the metadata is coming from -
that's
> > to come later.
> >
> > Here are some notes on the design of these two classes:
> >
> > 1. Clazz is a metadescription of a  generalized bean (JDK bean, "modern"
> > bean, DynaBean, Map, EJB etc).
> >
> > 2. In some cases there is more than one Clazz that can describe a
particular
> > object. For example, the same object can be described as a standard bean
as
> > well as a "modern" bean.  Therefore I have introduced the notion of a
> > "model" identified by a URI.  I am thinking the URI itself might map to
a
> > verbal description of the model.
> >
> > 3. Clazz has a newInstance() method that is responsible for object
> > allocation.
>
> I looked at the API stuff.  I think there is an awful lot of extra stuff.
> KISS (Keep It Simple, Stupid).
I think the expression is actually "Keep It Simple and Stupid", otherwise it
might sound like you are calling me stupid, which of course you never would.

Do you really mean that there is an "awful" lot of extra stuff or you mean
that the stuff is not very well compartmentalized into little Method
objects?  I'll buy that for a dollar.

> Let's follow the java.lang.reflect.* as much as possible.  Provide a
> getClass() method to get the original class.  Provide a getMethod() for
> the AttributeMethod from the clazz.  That sort of thing.
Could you elaborate a little bit?  Could you give some examples of APIs
along with examples of how you envision them being used?  I am especially
interested in the dynamic case where there are no concrete classes, just
data and metadata constructed at runtime.

What would I use getClass() for?  Why not call object.getClass() directly?

What is the benefit of encapsulating access into a Method object? At this
early stage of design work the reason has to be more than pure esthetics.

- Dmitri



--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@;jakarta.apache.org>

Reply via email to