3 Replies Latest reply on Jul 1, 2011 8:46 PM by richard yang

    How to inject based on class name?

    richard yang Newbie
      I have this kind of java reflection in my code:
      Class<?> myClass= Class.forName("MyClassName");
      MyType myObject = (MyType)myClass.newInstance();

      If I want to use weld to inject an "myObject", is there way to do it?

      i.e., how to inject an object based on this object's class name?