Package org.timerescue.information

Examples of org.timerescue.information.Serializable


   */
  @Test
  public void testGetSerializableFromClass() {
    DefaultAttackAction action = new DefaultAttackAction();
    String clasname = action.getClass().getName();
    Serializable ser = null;
    try {
      ser = Introspection.getSerializableFromClass(action.getClass().getName());
    } catch (ClassNotFoundException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      fail("Error ClassNotFound");
    } catch (InstantiationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      fail("Error InstantiationException");
    } catch (IllegalAccessException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      fail("Error IllegalAccessException");
    }
   
    assertArrayEquals(clasname.getBytes(), ser.getClass().getName().getBytes() );
   
  }
View Full Code Here


      throws ClassNotFoundException,
      InstantiationException,
      IllegalAccessException {
   
    Class<Serializable> cls = null;
    Serializable object = null;
    cls = ((Class<Serializable>) Class.forName(class_name));
    object = (Serializable) cls.newInstance();   
    return object;
  }
View Full Code Here

TOP

Related Classes of org.timerescue.information.Serializable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.