Can I create a new object?

1 view
Skip to first unread message

Curtis Stanford

unread,
Sep 29, 2010, 11:34:10 AM9/29/10
to gwittir-users
With the Introspection API, I see ways to get properties from an
already constructed object, but is there any way to create a new
object from a String class name?

Curtis

Robert "kebernet" Cooper

unread,
Sep 29, 2010, 12:08:54 PM9/29/10
to gwitti...@googlegroups.com
No. There isn't a way to do a forName().newInstance().

Generally, depending on what you want to do, you can create a generic factory of Guice Providers or (for most Gwittir stuff) BoundWidgetProvider and index them based on class names.


--
You received this message because you are subscribed to the Google Groups "gwittir-users" group.
To post to this group, send email to gwitti...@googlegroups.com.
To unsubscribe from this group, send email to gwittir-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwittir-users?hl=en.




--
:Robert "kebernet" Cooper
::kebe...@gmail.com
Alice's cleartext
Charlie is the attacker
Bob signs and encrypts
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8

Curtis Stanford

unread,
Sep 29, 2010, 12:28:18 PM9/29/10
to gwittir-users
Yah, cool, thanks.

On Sep 29, 10:08 am, "Robert \"kebernet\" Cooper" <keber...@gmail.com>
wrote:
> No. There isn't a way to do a forName().newInstance().
>
> Generally, depending on what you want to do, you can create a generic
> factory of Guice Providers or (for most Gwittir stuff) BoundWidgetProvider
> and index them based on class names.
>
> On Wed, Sep 29, 2010 at 11:34 AM, Curtis Stanford <
>
>
>
>
>
>
>
>
>
> cur...@stanfordcomputing.com> wrote:
> > With the Introspection API, I see ways to get properties from an
> > already constructed object, but is there any way to create a new
> > object from a String class name?
>
> > Curtis
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "gwittir-users" group.
> > To post to this group, send email to gwitti...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > gwittir-user...@googlegroups.com<gwittir-users%2Bunsubscribe@goog legroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/gwittir-users?hl=en.
>
> --
> :Robert "kebernet" Cooper
> ::keber...@gmail.com
Reply all
Reply to author
Forward
0 new messages