title: How to convert List<Object> into List<MyClass>?
body: <p>in Java i have one List of Objects from my database and i want to convert this objects into my class objects but i cant find the solution.</p>
  
  <p>My List of objects is <code>SalvaguardasAGR</code> and i want to convert this objects to <code>List&lt;AGRSalvaguardasInforme&gt;</code>.</p>
  
  <p>I tried with </p>
  
  <p><code>List&lt;AGRSalvaguardasInforme&gt; InformeFinal = new ArrayList&lt;AGRSalvaguardasInforme&gt;(SalvaguardasAGR);</code> </p>
  
  <p>as i see in <a href="https://stackoverflow.com/questions/1917844/how-to-cast-listobject-to-listmyclass">How to cast List&lt;Object&gt; to List&lt;MyClass&gt;</a> and <a href="https://stackoverflow.com/questions/4288084/how-to-convert-liststring-to-listobject">How to Convert List&lt;String&gt; to List&lt;Object&gt;</a> but throw this exception:</p>
  
  <pre><code>    25-sep-2014 17:40:47 org.apache.catalina.core.StandardWrapperValve invoke
  GRAVE: El Servlet.service() para el servlet [procop2front] en el contexto con ruta [/CDNMS] lanzó la excepción [java.lang.Error: Unresolved compilation problem: 
      The constructor ArrayList&lt;AGRSalvaguardasInforme&gt;(List&lt;Object&gt;) is undefined
  ] con causa raíz
  java.lang.Error: Unresolved compilation problem: 
          The constructor ArrayList&lt;AGRSalvaguardasInforme&gt;(List&lt;Object&gt;) is undefined at com.dominion.procop.agr.struts.actions.AGRInformes.mostrarInformeActivosAGR(AGRInformes.java:1140)
  </code></pre>
  
  <p>I tried a simple <code>List&lt;AGRSalvaguardasInforme&gt; InformeFinal = (AGRSalvaguardasInforme)SalvaguardasAGR;</code> too but still not working.</p>
  
  <p>What im doing wrong? how i can convert a List of objects into a List of AGRSalvaguardasInforme?</p>
  
  <p>Thank you in advance.</p>