Package org.adoptopenjdk.jitwatch.model

Examples of org.adoptopenjdk.jitwatch.model.MetaClass


    catch (ClassNotFoundException cnfe)
    {     
      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);
   
//    private void testCallChain3()
//    {
View Full Code Here


    catch (ClassNotFoundException cnfe)
    {
      fail();
    }

    MetaClass metaClass = testModel.getPackageManager().getMetaClass(fqClassName);
    IMetaMember testMember = metaClass.getMemberFromSignature(MemberSignatureParts.fromParts(fqClassName, methodName, "void", new String[] { "long" }));

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

    catch (ClassNotFoundException cnfe)
    {
      fail();
    }

    MetaClass metaClass = testModel.getPackageManager().getMetaClass(fqClassName);
    IMetaMember testMember = metaClass.getMemberFromSignature(MemberSignatureParts.fromParts(fqClassName, methodName, "void", new String[] { "long" }));

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

  @Test
  public void testFindBestLineMatchForMemberSignature()
  {
    Method m = getMethod("java.util.Arrays", "copyOf", new Class<?>[] { Object[].class, int.class, Class.class });
   
    MetaClass metaClass = new MetaClass(null, "java.util.arrays");
    IMetaMember member = new MetaMethod(m, metaClass);
   
    List<String> srcLinesList = new ArrayList<>();

    srcLinesList.add("public static <T> T[] copyOf(T[] original, int newLength) {");
View Full Code Here

  @Test
  public void testFindBestLineMatchForMemberSignatureBytecode()
  {
    Method m = getMethod("java.util.Arrays", "copyOf", new Class<?>[] { Object[].class, int.class, Class.class });
   
    MetaClass metaClass = new MetaClass(null, "java.util.arrays");
    IMetaMember member = new MetaMethod(m, metaClass);
   
    List<String> srcLinesList = new ArrayList<>();

    srcLinesList.add("public static <T extends java/lang/Object> T[] copyOf(T[], int);");
View Full Code Here

  @Test
  public void testFindBestLineMatchForMemberSignatureBytecodeRegression()
  {
    Method m = getMethod("java.util.Arrays", "copyOf", new Class<?>[] { Object[].class, int.class });
       
    MetaClass metaClass = new MetaClass(null, "java.util.arrays");
    IMetaMember member = new MetaMethod(m, metaClass);

    List<String> srcLinesList = new ArrayList<>();

    srcLinesList
View Full Code Here

  {
    String coreClassWithVarArgs = getClass().getName();
       
    JITDataModel model = new JITDataModel();
   
    MetaClass metaClass = null;
   
    try
    {
      metaClass = model.buildAndGetMetaClass(ClassUtil.loadClassWithoutInitialising(coreClassWithVarArgs));
    }
    catch (ClassNotFoundException cnfe)
    {
      cnfe.printStackTrace();
      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

  {
    String thisClass = getClass().getName();
       
    JITDataModel model = new JITDataModel();
   
    MetaClass metaClass = null;
   
    try
    {
      metaClass = model.buildAndGetMetaClass(ClassUtil.loadClassWithoutInitialising(thisClass));
    }
    catch (ClassNotFoundException cnfe)
    {
      cnfe.printStackTrace();
      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

  {
    String awtWindowClass = "java.awt.Window";
       
    JITDataModel model = new JITDataModel();
   
    MetaClass metaClass = null;
   
    try
    {
      metaClass = model.buildAndGetMetaClass(ClassUtil.loadClassWithoutInitialising(awtWindowClass));
    }
    catch (ClassNotFoundException cnfe)
    {
      cnfe.printStackTrace();
      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

  {
    String thisClassName = getClass().getName();

    MetaPackage metaPackage = new MetaPackage(StringUtil.getPackageName(thisClassName));

    MetaClass metaClass = new MetaClass(metaPackage, StringUtil.makeUnqualified(thisClassName));

    String testMethodName = "unicodeMethodNameµµµµµ";

    Method method = getClass().getDeclaredMethod(testMethodName, new Class[0]);
View Full Code Here

TOP

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

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.