commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitri Plotnikov <dmi...@apache.org>
Subject Re: [JXPATH] Difference in introspection
Date Fri, 14 Jun 2002 03:10:47 GMT
Steve,

The idea of writing a custom JXPathBeanInfo is not that bad.  On the other
hand, I don't see why I could not update the introspector to recursively
acquire property descriptors for all those parent interfaces.

The only issue with the use of the JXPathBeanInfo for the interface is that
the _only_ properties available via the XPaths will be those on the
interface.  Any additional properties declared by the class directly will be
inaccessible.

Would it be possible to get JXPathBeanInfo for the object's class, not the
interface?

- Dmitri

----- Original Message -----
From: "Stephen Bartlett" <sbartlett@versata.com.au>
To: "'Jakarta Commons Developers List'" <commons-dev@jakarta.apache.org>
Sent: Thursday, June 13, 2002 7:32 PM
Subject: RE: [JXPATH] Difference in introspection


> Dmitri,
>
> I have a NodePointerFactory impl that uses the JXPathIntrospector to
create
> a JXPathBeanInfo object for an Interface. I take it this is incorrect
> usage??
>
> Looking at the code JXPathBasicBeanInfo.getPropertyDEscriptors() tests for
> an Interface but the BeanInfo object returned by
> java.beans.Introspector.getBeanInfo() doesn't  recognizes methods from
super
> interfaces even without a 'stop' class.
>
> I guess I could implement my own JXPathBeanInfo class that uses reflection
> instead of JavaBeans to create PropertyDescriptors ?
>
> cheers,
> steve.
>
> > -----Original Message-----
> > From: Dmitri Plotnikov [mailto:dmitri@apache.org]
> > Sent: Thursday, 13 June 2002 10:42 PM
> > To: Jakarta Commons Developers List
> > Subject: Re: [JXPATH] Difference in introspection
> >
> >
> > Stephen,
> >
> > > Any reason why Interfaces are introspected differently Objects ?
> > >
> > > When an Interface is introspected "PropertyDescriptors" are
> > created only
> > for
> > > methods defined on the Interface and not for inherited
> > methods.  This is
> > not
> > > the case when an Object is introspected.
> > >
> > > Is this expected? I feel it is inconsistent and prevents me
> > from extending
> > > Interfaces.
> > JXPath is not supposed to introspect interfaces - just
> > JavaBeans.  How did
> > you get it to introspect an interface?
> >
> > Thanks,
> >
> > >
> > > Steve.
> >
> > - Dmitri
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:commons-dev-help@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:commons-dev-help@jakarta.apache.org>
>
>


--
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