A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
Creating Java classes on fly
Joined: Feb 26, 2006
Jul 15, 2009 09:33:43
Can any one tell me how can I create Java classes on the fly.
Like if I provide name of the
class(fully qualified), with specification of its methods and fields how can I create java classes on fly.
Do I need some Byte code engg. or I can do it with Plane reflection
Joined: Mar 22, 2005
Jul 15, 2009 09:49:26
Reflection only works on existing objects (and hence, classes). But you can construct classes from source code at runtime using a library like Javassist.
I wrote for the JavaRanch Journal explains how it's done.
Ping & DNS, my free Android app for network diagnostics
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: Creating Java classes on fly
how to perform query on multiple tables dynamically? tables that has no mapped entity
Creating a Class on-the-fly
dynamic proxy creation
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013