jakarta-bcel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <m.d...@4flow.de>
Subject AW: Dealing with Repository class.
Date Wed, 17 Apr 2002 15:22:10 GMT

> What I would prefer to see in BCEL in a lot of these areas 
> are interfaces
> that have several realizations.  I'd like to see a 
> "BCELClass" interface, a
> "Repository" interface, an "Attribute" interface, a "ConstantPool"
> interface, etc.  Then I'd like to see the various forms of 
> these things
> (read in from class, synthetically generated, etc) be different
> instantiations of these interfaces.  And in general, I would 
> design things
> so that references generally only refer to these interfaces, never to
> concrete implementations.  (Instantiation obviously has to 
> happen on the
> concrete classes.)  
> For example, I would have JavaClass and ClassGen both implement the
> "BCELClass" interface, but within BCEL's code, I would only refer to
> "BCELClass" so that I'm agnostic to where the class came from.

Interfaces are surely a nice abstraction. However, the split between
JavaClass and ClassGen was a deliberate design decision. They have
of course some things in common, but quite different intentions and
semantics. I wouldn't say that's an ideal solution, I just wonder
how much "design space" there is for different implementations, since
everything is limited by the JVM spec. And you can still subclass
of course.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message