Package org.adoptopenjdk.jitwatch.model

Examples of org.adoptopenjdk.jitwatch.model.MemberSignatureParts


      fail();
    }

    MetaClass metaClass = testModel.getPackageManager().getMetaClass(fqClassName);
   
    MemberSignatureParts msp = MemberSignatureParts.fromLogCompilationSignature("org.adoptopenjdk.jitwatch.demo.MakeHotSpotLog " + methodName + " ()V");
   
    IMetaMember testMember = metaClass.getMemberFromSignature(msp);

    CompileNode root = buildCompileNodeForXML(lines, testMember, testModel);
   
View Full Code Here


  }

  @Test
  public void testMemberSignaturePartsPrimitiveParamPrimitiveReturn() throws LogParseException
  {
    MemberSignatureParts msp = MemberSignatureParts.fromLogCompilationSignature("java.lang.String charAt (I)C");
   
    assertEquals("java.lang.String", msp.getFullyQualifiedClassName());
    assertEquals("charAt", msp.getMemberName());
    assertEquals("char", msp.getReturnType());
    assertEquals(1, msp.getParamTypes().size());
    assertEquals("int", msp.getParamTypes().get(0));
  }
View Full Code Here

  }
 
  @Test
  public void testMemberSignaturePartsConstructor() throws LogParseException
  {
    MemberSignatureParts msp = MemberSignatureParts.fromLogCompilationSignature("java.lang.Object <init> ()V");

    assertEquals("java.lang.Object", msp.getFullyQualifiedClassName());
    assertEquals("java.lang.Object", msp.getMemberName());
    assertEquals("void", msp.getReturnType());
    assertEquals(0, msp.getParamTypes().size());
  }
View Full Code Here

  }
   
  @Test
  public void testMemberSignaturePartsPrimitiveParamVoidReturn() throws LogParseException
  {
    MemberSignatureParts msp = MemberSignatureParts.fromLogCompilationSignature("java.lang.AbstractStringBuilder ensureCapacityInternal (I)V");

    assertEquals("java.lang.AbstractStringBuilder", msp.getFullyQualifiedClassName());
    assertEquals("ensureCapacityInternal", msp.getMemberName());
    assertEquals("void", msp.getReturnType());
    assertEquals(1, msp.getParamTypes().size());
    assertEquals("int", msp.getParamTypes().get(0));
  }
View Full Code Here

  }

  @Test
  public void testMemberSignaturePartsPrimitiveParamObjectReturn() throws LogParseException
  {
    MemberSignatureParts msp = MemberSignatureParts.fromLogCompilationSignature("java.lang.AbstractStringBuilder append (Z)Ljava.lang.AbstractStringBuilder;");

    assertEquals("java.lang.AbstractStringBuilder", msp.getFullyQualifiedClassName());
    assertEquals("append", msp.getMemberName());
    assertEquals("java.lang.AbstractStringBuilder", msp.getReturnType());
    assertEquals(1, msp.getParamTypes().size());
    assertEquals("boolean", msp.getParamTypes().get(0));
  }
View Full Code Here

  }
 
  @Test
  public void testMemberSignaturePartsMultiDimensionalArrayParamPrimitiveReturn() throws LogParseException
  {
    MemberSignatureParts msp = MemberSignatureParts.fromLogCompilationSignature("com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl setChunkIndex ([[IIII)I");

    assertEquals("com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl", msp.getFullyQualifiedClassName());
    assertEquals("setChunkIndex", msp.getMemberName());
    assertEquals("int", msp.getReturnType());
    assertEquals(4, msp.getParamTypes().size());
    assertEquals("[[I", msp.getParamTypes().get(0));
    assertEquals("int", msp.getParamTypes().get(1));
    assertEquals("int", msp.getParamTypes().get(2));
    assertEquals("int", msp.getParamTypes().get(3));
  }
View Full Code Here

      fail();
    }

    String bytecodeSig = "public void doSomethingWithVarArgs(java.lang.String...)";
   
    MemberSignatureParts msp = MemberSignatureParts.fromBytecodeSignature("org.adoptopenjdk.jitwatch.test.TestParseUtil", bytecodeSig);
   
    IMetaMember foundVarArgsMethod = metaClass.getMemberFromSignature(msp);
   
    assertNotNull(foundVarArgsMethod);
  }
View Full Code Here

      fail();
    }

    String bytecodeSig = "public void method_with_underscores()";
   
    MemberSignatureParts msp = MemberSignatureParts.fromBytecodeSignature("org.adoptopenjdk.jitwatch.test.TestParseUtil", bytecodeSig);
   
    IMetaMember foundVarArgsMethod = metaClass.getMemberFromSignature(msp);
   
    assertNotNull(foundVarArgsMethod);
  }
View Full Code Here

      fail();
    }

    String bytecodeSig = "static int access$600(java.awt.Window)";
   
    MemberSignatureParts msp = MemberSignatureParts.fromBytecodeSignature(awtWindowClass, bytecodeSig);
   
    IMetaMember foundVarArgsMethod = metaClass.getMemberFromSignature(msp);
   
    assertNotNull(foundVarArgsMethod);
  }
View Full Code Here

  public void testMethodWithPolymorphicSignature() throws Exception
  {
    JITDataModel model = new JITDataModel();
    model.buildAndGetMetaClass(java.lang.invoke.MethodHandle.class);

    MemberSignatureParts msp = MemberSignatureParts
        .fromLogCompilationSignature("java.lang.invoke.MethodHandle linkToStatic (Ljava.lang.Object;Ljava.lang.invoke.MemberName;)V");

    IMetaMember member = model.findMetaMember(msp);
   
    assertNotNull(member);
View Full Code Here

TOP

Related Classes of org.adoptopenjdk.jitwatch.model.MemberSignatureParts

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.