Package org.adoptopenjdk.jitwatch.model

Examples of org.adoptopenjdk.jitwatch.model.MemberSignatureParts


  {
   
    JITDataModel model = new JITDataModel();
    model.buildAndGetMetaClass(java.lang.String.class);

    MemberSignatureParts msp = MemberSignatureParts
        .fromLogCompilationSignature("java.lang.String indexOf (II)I");

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


    int offset = entry.getBytecodeOffset();

    assertEquals(0, offset);
   
    MemberSignatureParts msp = entry.getMemberSignatureParts();
   
    assertEquals("add", msp.getMemberName());
    assertEquals("int", msp.getReturnType());
    assertEquals(2, msp.getParamTypes().size());
    assertEquals("int",  msp.getParamTypes().get(0));
    assertEquals("int",  msp.getParamTypes().get(1));

    MemberBytecode memberBytecode2 = classBytecode.getMemberBytecode("public org.adoptopenjdk.jitwatch.demo.SandboxTest()");

    assertNotNull(memberBytecode2);

    List<BytecodeInstruction> instructions2 = memberBytecode2.getInstructions();

    assertEquals(3, instructions2.size());
   
    LineTable lineTable2 = memberBytecode2.getLineTable();

    LineTableEntry entry2 = lineTable2.getEntryForSourceLine(3);

    int offset2 = entry2.getBytecodeOffset();

    assertEquals(0, offset2);
   
    MemberSignatureParts msp2 = entry2.getMemberSignatureParts();
   
    assertEquals("org.adoptopenjdk.jitwatch.demo.SandboxTest", msp2.getMemberName());
    assertEquals("void", msp2.getReturnType());
    assertEquals(0, msp2.getParamTypes().size());

  }
View Full Code Here

    assertEquals(65, lineTable.findSourceLineForBytecodeOffset(7));
    assertEquals(66, lineTable.findSourceLineForBytecodeOffset(8));
    assertEquals(66, lineTable.findSourceLineForBytecodeOffset(9));
    assertEquals(66, lineTable.findSourceLineForBytecodeOffset(100));
   
    MemberSignatureParts msp = lineTable.getEntryForSourceLine(65).getMemberSignatureParts();
   
    assertEquals("measureWrong", msp.getMemberName());
    assertEquals("void", msp.getReturnType());
    assertEquals(0, msp.getParamTypes().size());
  }
View Full Code Here

        String source = parts[0].trim();
        String offset = parts[1].trim();

        try
        {
          MemberSignatureParts msp = MemberSignatureParts.fromBytecodeSignature(fqClassName, memberSignature);
         
          LineTableEntry entry = new LineTableEntry(msp, Integer.parseInt(source), Integer.parseInt(offset));
          memberBytecode.getLineTable().add(entry);
        }
        catch (NumberFormatException nfe)
View Full Code Here

    {
      LineTableEntry entry = getLineTableEntryForSourceLine(metaClass, sourceLine);

      if (entry != null)
      {
        MemberSignatureParts msp = entry.getMemberSignatureParts();

        IMetaMember nextMember = metaClass.getMemberFromSignature(msp);

        if (nextMember != null)
        {
View Full Code Here

  {
    IMetaMember metaMember = null;

    if (logSignature != null)
    {
      MemberSignatureParts msp = MemberSignatureParts.fromLogCompilationSignature(logSignature);

      metaMember = model.findMetaMember(msp);

      if (metaMember == null)
      {
View Full Code Here

        int score = 0;

        if (line.contains(memberName))
        {
          MemberSignatureParts msp = MemberSignatureParts.fromBytecodeSignature(member.getMetaClass()
              .getFullyQualifiedName(), line);

          if (!memberName.equals(msp.getMemberName()))
          {
            continue;
          }

          // modifiers matched
          if (msp.getModifier() != modifier)
          {
            continue;
          }

          List<String> mspParamTypes = msp.getParamTypes();

          if (mspParamTypes.size() != paramTypeNames.length)
          {
            continue;
          }

          int pos = 0;

          for (String memberParamType : paramTypeNames)
          {
            String mspParamType = msp.getParamTypes().get(pos++);

            if (compareTypeEquality(memberParamType, mspParamType, msp.getGenerics()))
            {
              score++;
            }
          }

          // return type matched
          if (compareTypeEquality(returnTypeName, msp.getReturnType(), msp.getGenerics()))
          {
            score++;
          }

          if (score > bestScore)
View Full Code Here

        }
      }

      if (metaClass != null)
      {
        MemberSignatureParts msp = MemberSignatureParts.fromParts(metaClass.getFullyQualifiedName(), methodName,
            returnType, argumentTypes);
        result = metaClass.getMemberFromSignature(msp);
      }
      else
      {
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.