Package org.springsource.loaded.SystemClassReflectionRewriter

Examples of org.springsource.loaded.SystemClassReflectionRewriter.RewriteResult.summarize()


    // Check the correct amount of rewriting went on
    assertTrue((rr.bits & JLC_GETDECLAREDFIELDS) != 0);
    assertTrue((rr.bits & ~JLC_GETDECLAREDFIELDS) == 0);

    assertEquals(1, callcount);
    assertEquals("Class.getDeclaredFields()", rr.summarize());
  }

  @Test
  public void jlClass_getDeclaredField() throws Exception {
    byte[] classbytes = loadBytesForClass("system.Two");
View Full Code Here


    assertEquals(2, callcount);
    assertEquals(2, events.size());
    assertEquals("helper2(system.Two,s)", events.get(0));
    assertEquals("helper2(system.Two,foo)", events.get(1));
    assertEquals("Class.getDeclaredField()", rr.summarize());
  }

  @Test
  public void jlClass_getField() throws Exception {
    byte[] classbytes = loadBytesForClass("system.Three");
View Full Code Here

    assertEquals(2, callcount);
    assertEquals(2, events.size());
    assertEquals("helper2(system.Three,s)", events.get(0));
    assertEquals("helper2(system.Three,foo)", events.get(1));
    assertEquals("Class.getField()", rr.summarize());
  }

  @Test
  public void jlClass_getDeclaredMethods() throws Exception {
    byte[] classbytes = loadBytesForClass("system.Four");
View Full Code Here

    // Check the correct amount of rewriting went on
    assertTrue((rr.bits & JLC_GETDECLAREDMETHODS) != 0);
    assertTrue((rr.bits & ~JLC_GETDECLAREDMETHODS) == 0);

    assertEquals(1, callcount);
    assertEquals("Class.getDeclaredMethods()", rr.summarize());
  }
 
  @Test
  public void jlClass_getDeclaredConstructors() throws Exception {
    byte[] classbytes = loadBytesForClass("system.Ten");
View Full Code Here

    // Check the correct amount of rewriting went on
    assertTrue((rr.bits & JLC_GETDECLAREDCONSTRUCTORS) != 0);
    assertTrue((rr.bits & ~JLC_GETDECLAREDCONSTRUCTORS) == 0);

    assertEquals(1, callcount);
    assertEquals("Class.getDeclaredConstructors()", rr.summarize());
  }
 
  @Test
  public void jlrMethod_Invoke() throws Exception {
    byte[] classbytes = loadBytesForClass("system.Eleven");
View Full Code Here

    // Check the correct amount of rewriting went on
    assertTrue((rr.bits & (JLC_GETDECLAREDMETHOD|JLRM_INVOKE)) != 0);
    assertTrue((rr.bits & ~(JLC_GETDECLAREDMETHOD|JLRM_INVOKE)) == 0);

    assertEquals(1, callcount);
    assertEquals("Class.getDeclaredMethod() Method.invoke()", rr.summarize());
  }

  @Test
  public void jlClass_getDeclaredMethod() throws Exception {
    byte[] classbytes = loadBytesForClass("system.Five");
View Full Code Here

    assertEquals(2, callcount);
    assertEquals(2, events.size());
    assertEquals("helper4(system.Five,runIt)", events.get(0));
    assertEquals("helper4(system.Five,foobar)", events.get(1));
    assertEquals("Class.getDeclaredMethod()", rr.summarize());
  }

  @Test
  public void jlClass_getMethod() throws Exception {
    byte[] classbytes = loadBytesForClass("system.Six");
View Full Code Here

    assertEquals(2, callcount);
    assertEquals(2, events.size());
    assertEquals("helper4(system.Six,runIt)", events.get(0));
    assertEquals("helper4(system.Six,foo)", events.get(1));
    assertEquals("Class.getMethod()", rr.summarize());
  }

  @Test
  public void jlClass_getDeclaredConstructor() throws Exception {
    byte[] classbytes = loadBytesForClass("system.Seven");
View Full Code Here

    assertEquals(3, callcount);
    assertEquals(3, events.size());
    assertEquals("helper5(system.Seven)", events.get(0));
    assertEquals("helper5(system.Seven)", events.get(1));
    assertEquals("helper5(system.Seven)", events.get(2));
    assertEquals("Class.getDeclaredConstructor()", rr.summarize());
  }


  @Test
  public void jlrField_getLong() throws Exception {
View Full Code Here

    // Check the correct amount of rewriting went on
    assertTrue((rr.bits & (JLRF_GETLONG | JLC_GETFIELD)) != 0);
    assertTrue((rr.bits & ~(JLRF_GETLONG | JLC_GETFIELD)) == 0);

    assertEquals(1, callcount);
    assertEquals("Class.getField() Field.getLong()", rr.summarize());
  }
 
  @Test
  public void jlrField_get() throws Exception {
    byte[] classbytes = loadBytesForClass("system.Twelve");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.