> from: Victor Volle <[EMAIL PROTECTED]> > > It may be better to use Clazz and MetaClazz however. We should probably > > name either: > > a) following reflection: > > MetaClass/MetaField/MetaMethod > > AClass/AField/AMethod > > > > b) create out own names: > > MetaClazz/MetaProperty/MetaOperation > > Clazz/Property/Operation > > > > (a) might initially make more sense, but is a method bound to a specific > > object (a delegate) something that should be named AMethod? Operation > seems > > a better name. Similarly for Field vs Property. > > 1 Operation (because an operation me be abstract a method generally not) > 1 Field
Field is a problem because it clashes with java.lang.reflect.Field. It can't be Attribute, as thats the metadata, thus Property. > BTW: in XMI operations and fields are subsumed under the name "feature". Could be useful name. Is there a simple quick guide to XMI anywhere you know of? > > > 2. In the method MetaBean#getMetaPropertyMap you > > > return the map of properties... > > > ... do you intend to always create a copy? > > > > The implementation can choose to do as it wishes. It might: > > a) return an unmodifiable Map - the normal case > > b) return a modifiable Map - for truly dynamic beans > > a) but then we need addXXX methods > > Anyway I would like to be able to react on some > client adding a Field or Operation. This is where (b) is not a simple HashMap implementation. Instead, it is a class that implements the Map interface and sends events, or reacts as it wishes. Reusing the collections API is definitey the way to go from an API point of view ;-) It makes implementations a little harder, but thats the right way round. > > > 4. What about inner classes? > > Do we care? > Probably not. But can we then have a > MetaModelFactory to plug in my own implementations for > MetaClass and so on. (I would need it for my code generator) We will need various pluggable factories. I haven't started to think about them yet. > > > 7. What about having a getName() operation > > > in MetaUnit? (why "unit"? what about > > > MetaModelElement? "unit" sounds wrong > > > for me, but I can not explain why). > > > In MetaBean this could return > > > Package ShortClassName > > > > MetaUnit does contain a getName()! > > Oops, overlloked that. > What about the name? Yes, Unit is a bad name. I'm open to offers. Stephen -- To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:commons-dev-help@;jakarta.apache.org>