commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rand McNeely" <rand_mcne...@yahoo.com>
Subject RE: [lang] Reflection or not?
Date Fri, 05 Jul 2002 07:08:40 GMT
Response in line

> -----Original Message-----
> From: ringo.desmet@mediagenix.com [mailto:ringo.desmet@mediagenix.com]
> Sent: Friday, July 05, 2002 1:46 AM
> To: commons-dev@jakarta.apache.org
> Subject: [lang] Reflection or not?
> 
> Hello,
> 
> One of the things that need further discussion before a 1.0 release of
> Commons-Lang is the fact whether we are going to add some reflection
> functionality or not. With this message, I would like to get the ball
> rolling.
> 
> Here are my questions and opinions.
> 
> Q: Do you consider commons-lang only an extension to java.lang or to
> java.lang *and* it's subpackages?
> A: I would consider it an extension to java.lang *and* it's
subpackages.

I agree, reflection should be part of the commons-lang project but I
feel it should be in a ...lang.reflect package.  I think that Sun should
have placed Class in reflect but since they didn't, we should adhere to
their structures (Classes should remain in ...lang and Methods and other
future reflection classes should go in ...lang.reflect).

> Q: Can we add reflection functionality without overlapping with
> Commons-BeanUtils?
> A: This depends on what functionality people have in mind.
> 

It seems so.  There are some more general reflection methods that would
be nice to have (such as getConstructor(String clazz,Class[] args) or
createInstance(String clazz,Object[] args) that aren't really applicable
to beans.  However, BeanUtils does seem to be using many methods that
would be more suitable in a reflect package.  Is it possible to refactor
them into lang and modify BeanUtils to use the ...lang.reflect classes?

> Q: Can we add reflection possibility without introducing new
dependencies?
> A: Commons-lang should only have the JDK libraries as its dependency
for
> users of commons-lang. JUnit required for testing purposes.

Lang sounds like it ought to be the base package for other commons
projects (it's a shame it wasn't written first).  Introducing
dependencies on other projects may cause a mess down the line as they
may later choose to modify pieces of their code to use lang once it is
released (notice that java.lang.* and java.lang.reflect use arrays and
not Lists or Enumerations).

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

Rand


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


Mime
View raw message