Hi,

What you are trying to achieve is based on the reflection capabilities
of Java and mainly the class java.lang.Class. (See
http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Class.html)

To describe it shortly:

a) use static method forName: Class.forName(yourClassName)
b) then use reflection on the object of class Class that will be
returned:
   class.getConstructors() to get the constructor you need
c) read http://download.oracle.com/javase/tutorial/reflect/class/index.html
and http://download.oracle.com/javase/tutorial/reflect/member/index.html
to discover the next steps.

This is fully possible as App Engine gives access to the reflection
API of Java. I personnally use this API on GAE.

regards

didier

On Dec 14, 10:41 pm, Abdel_eid <a.eid.1...@gmail.com> wrote:
> Dear All ,
>    I am working on a project in which the user enters the class name
> and data that he needs to add to the data store but i faced a big
> problem , i had successfully read the data from the user and checked
> it's correctness but i am trying to open a new instance of the class
> send by the user in the form of String
>
> for example String class_name = "Student";
> String final_class_name = package_name + class_name;
>
> so how can i open an object of that sent class and also send the
> caught variables to it's constructor
> N.B i don't know how many classes i had or there name to check it with
> ( instance of )
>
> Thanks for your attention

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to