Dmitri Plotnikov wrote:
Another dilemma we'll have to resolve is whether metadata will be
type-based, instance-based or both.
Here's what I am talking about:
Let's say we have this class:
class Address {
public Object getStreet(){ return new String[]{"555", "Sole Pike"}; }
public Comparable getCity() { return "Chipsburg"; }
}
Type-based introspection (like java.beans.Introspector) will tell us
that "street" is a property of type "Object" and "city" has type
"Comparable".
Instance-based introspection will give us "String[]" and "String"
respectively.
Question: is "street" a collection (indexed) property? From the type's
prospective it is not, from the instance prospective it is.
But what metadata are you looking at? Your Address class is Data. What
data about the data are you looking for? The examples you gave describe
the Reflection API which is Type based.
Most meta info that is useful is type based, not instance based.
What you are looking at is instance based reflection info. Not a more
generic meta info.
Meta info that is useful to me is things like this:
* Creation policy (pooled components, thread local components, singleton
components, etc.)
* Required components (i.e. when one component requires a component of
another type)
Stuff along those lines.
--
"They that give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety."
- Benjamin Franklin
--
To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@;jakarta.apache.org>