Package org.adoptopenjdk.jitwatch.model

Examples of org.adoptopenjdk.jitwatch.model.MetaClass


    {
      String thisClassName = getClass().getName();
     
      MetaPackage metaPackage = new MetaPackage(StringUtil.getPackageName(thisClassName));
     
      MetaClass metaClass = new MetaClass(metaPackage, StringUtil.makeUnqualified(thisClassName));
     
      String testMethodName = "voidReturnNoParams";
     
      Method method = getClass().getDeclaredMethod(testMethodName, new Class[0]);
     
      MetaMethod testMethod = new MetaMethod(method, metaClass);
     
      metaClass.addMetaMethod(testMethod);
     
      String testRetType = "void";
      String[] testParamTypes = new String[0];
     
      IMetaMember result = metaClass.getMemberFromSignature(MemberSignatureParts.fromParts(metaClass.getFullyQualifiedName(),testMethodName, testRetType, testParamTypes));
   
      assertNotNull(result);
      assertEquals(testMethod.toString(), result.toString());
    }
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 = "objectReturnObjectParam";
     
      Method method = getClass().getDeclaredMethod(testMethodName, new Class[]{java.lang.String.class});
     
      MetaMethod testMethod = new MetaMethod(method, metaClass);
     
      metaClass.addMetaMethod(testMethod);
     
      String testRetType = "java.lang.String";
      String[] testParamTypes = new String[]{"java.lang.String"};
     
      IMetaMember result = metaClass.getMemberFromSignature(MemberSignatureParts.fromParts(metaClass.getFullyQualifiedName(),testMethodName, testRetType, testParamTypes));
   
      assertNotNull(result);
      assertEquals(testMethod.toString(), result.toString());
    }
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 = "arrayReturnArrayParam";
     
      Method method = getClass().getDeclaredMethod(testMethodName, new Class[]{int[].class});
     
      MetaMethod testMethod = new MetaMethod(method, metaClass);
     
      metaClass.addMetaMethod(testMethod);
     
      String testRetType = "[Ljava.lang.String;";
      String[] testParamTypes = new String[]{"[I"};
     
      IMetaMember result = metaClass.getMemberFromSignature(MemberSignatureParts.fromParts(metaClass.getFullyQualifiedName(),testMethodName, testRetType, testParamTypes));
   
      assertNotNull(result);
      assertEquals(testMethod.toString(), result.toString());
    }
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 = "<init>";
     
      Constructor<?> constructor = getClass().getDeclaredConstructor(new Class[0]);
     
      MetaConstructor testConstructor = new MetaConstructor(constructor, metaClass);
     
      metaClass.addMetaConstructor(testConstructor);
     
      String testRetType = getClass().getName();
      String[] testParamTypes = new String[0];
     
      IMetaMember result = metaClass.getMemberFromSignature(MemberSignatureParts.fromParts(metaClass.getFullyQualifiedName(),testMethodName, testRetType, testParamTypes));
   
      assertNotNull(result);
      assertEquals(testConstructor.toString(), result.toString());
    }
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.