Search:

Type: Posts; User: Gravity Games

Search: Search took 0.13 seconds.

  1. Replies
    9
    Views
    1,424

    Re: Calling a Class Name from a String?

    Though that brings up a new problem, it gives an error when I try to add the object:



    ArrayList<extendedobject> objects= new ArrayList<extendedobject>();

    Class<?> curclass;

    try{...
  2. Replies
    9
    Views
    1,424

    Re: Calling a Class Name from a String?

    Alright, but how do I add the object to an Arraylist as opposed to just creating it?
  3. Replies
    9
    Views
    1,424

    Re: Calling a Class Name from a String?

    Sorry if I'm just being stupid, but I don't understand what you mean by class definitions. The class I'm trying to load is in the project if that's what you mean. Also, the link you posted links to a...
  4. Replies
    9
    Views
    1,424

    Re: Calling a Class Name from a String?

    I googled that package and wasn't able to find what I needed. The closest I found was "getName();", which returns the name of a class as a string. I need to create an object from the class with the...
  5. Replies
    9
    Views
    1,424

    Calling a Class Name from a String?

    Well, out of curiosity, is it possible to call a class from the contents of a string.

    Here's a psuedo code example of what I mean:


    ArrayList <object> objects = new ArrayList <object>();...
Results 1 to 5 of 5