harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Zhang" <zhanghuang...@gmail.com>
Subject Re: [classlib][misc] Could we make ObjectAccessor.getInstance() public?
Date Thu, 15 Nov 2007 15:36:17 GMT
On Nov 15, 2007 11:22 PM, Nathan Beyer <nbeyer@gmail.com> wrote:

> This is a class in a org.apache.harmony package. By general
> convention, these classes are for implementation use within Harmony
> only.


Yes. So it must be useful for some scenarios (no matter harmony internal
classlib or other applications).

The problem I met is that an object persistence system wants to load an
object similar as the initial status of deserialized object. The object is
stored differently from java serialization mechanism, so it's difficult to
use ObjectInputStream.readObject(). Does it make sense?

But it must be platform dependent because no such api is defined in classlib
spec, though there's one AllocObject defined in JNI spec.


> At some point, these packages will be unavailable at runtime
> (via OSGi or the like restrictions).
>
> There may be exceptions to this rule, such as where Harmony will
> provide plug-in points, etc. However, I don't believe this is falls
> into that category. There are a number of reasons, but most of them
> fall under the fact that creating instances like this would circumvent
> many of basic tenants and assumptions of the class library and
> runtime.
>
> -Nathan
>
> On Nov 15, 2007 4:16 AM, Andrew Zhang <zhanghuangzhu@gmail.com> wrote:
> > Hi,
> >
> > I find some methods of ObjectAccessor are useful for some existing
> > applications and potential users, e.g, Object allocateObject(Class).
> Could
> > we make getInstance() public so that users can benefit from these
> utility
> > methods? Thanks!
> >
> > --
> > Best regards,
> > Andrew Zhang
> >
> > http://zhanghuangzhu.blogspot.com/
> >
>



-- 
Best regards,
Andrew Zhang

http://zhanghuangzhu.blogspot.com/

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