Examples of ClassInfo


Examples of alt.jiapi.file.ConstantPool.ClassInfo

     *
     * @param type type of the cast
     * @return an InstructionList
     */
    public Instruction cast(String type) {
        ClassInfo ci = cp.addClassInfo(type);
        short index = ci.getEntryIndex();

        byte[] bytes = new byte[3];
        bytes[0] = Opcodes.CHECKCAST;
        bytes[1] = (byte) (index >> 8);
        bytes[2] = (byte) (index & 255);
View Full Code Here

Examples of cn.wensiqun.info.ClassInfo

  public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
        if (name.endsWith("package-info")) {
            //info = new PackageInfo(CommonUtils.javaName(name));
        } else {
            ClassInfo classInfo = new ClassInfo(CommonUtils.javaName(name), CommonUtils.javaName(superName));

            for (String interfce : interfaces) {
                classInfo.getInterfaces().add(CommonUtils.javaName(interfce));
            }
            info = classInfo;
            classGrep.putCacheClassInfo(classInfo.getName(), classInfo);

            /*if (grepClient.isExtractSuperInterfaces())*/
            extractSuperInterfaces(classInfo);
        }
  }
View Full Code Here

Examples of com.bj58.spat.gaea.server.deploy.bytecode.ClassInfo

 
  private static String jarPath = "E:\\javaproject\\bj58.gaea.server\\lib";
 
  @Test
  public void testContract() {
    ClassInfo ciMulti = ScanClass.contract(IMulti.class);
    List<MethodInfo> miList1 = ciMulti.getMethodList();
    Assert.assertEquals("loadByID", miList1.get(0).getMethod().getName());
    Assert.assertEquals("loadByName", miList1.get(1).getMethod().getName());

   
    ClassInfo ciSingle = ScanClass.contract(ISingle.class);
    List<MethodInfo> miList2 = ciSingle.getMethodList();
    Assert.assertEquals("loadByID", miList2.get(0).getMethod().getName());
  }
View Full Code Here

Examples of com.google.api.client.util.ClassInfo

  }

  /** Parses the specified case-insensitive header pair into this HttpHeaders instance. */
  void parseHeader(String headerName, String headerValue, ParseHeaderState state) {
    List<Type> context = state.context;
    ClassInfo classInfo = state.classInfo;
    ArrayValueMap arrayValueMap = state.arrayValueMap;
    StringBuilder logger = state.logger;

    if (logger != null) {
      logger.append(headerName + ": " + headerValue).append(StringUtils.LINE_SEPARATOR);
    }
    // use field information if available
    FieldInfo fieldInfo = classInfo.getFieldInfo(headerName);
    if (fieldInfo != null) {
      Type type = Data.resolveWildcardTypeOrTypeVariable(context, fieldInfo.getGenericType());
      // type is now class, parameterized type, or generic array type
      if (Types.isArray(type)) {
        // array that can handle repeating values
View Full Code Here

Examples of com.google.code.vimsztool.omni.ClassInfo

    allBreakpoints.removeAll(invalidBreakPoints);
   
  }
 
  public boolean classContainsLineNum(ClassMetaInfoManager cmm, String className, int lineNum) {
    ClassInfo metaInfo = cmm.getMetaInfo(className);
    if (metaInfo.getLineNums().contains(lineNum)) return true;
    for (String innerClassName : metaInfo.getInnerClasses()) {
      ClassInfo innerClass = cmm.getMetaInfo(innerClassName);
      if (innerClass !=null && innerClass.getLineNums().contains(lineNum)) return true;
    }
    return false;
  }
View Full Code Here

Examples of com.google.common.reflect.ClassPath.ClassInfo

    assertEquals(ClassInfo.class, resourceInfo(Nested.class).getClass());
  }

  public void testGetSimpleName() {
    assertEquals("Foo",
        new ClassInfo("Foo.class", getClass().getClassLoader()).getSimpleName());
    assertEquals("Foo",
        new ClassInfo("a/b/Foo.class", getClass().getClassLoader()).getSimpleName());
    assertEquals("Foo",
        new ClassInfo("a/b/Bar$Foo.class", getClass().getClassLoader()).getSimpleName());
    assertEquals("",
        new ClassInfo("a/b/Bar$1.class", getClass().getClassLoader()).getSimpleName());
    assertEquals("Foo",
        new ClassInfo("a/b/Bar$Foo.class", getClass().getClassLoader()).getSimpleName());
    assertEquals("",
        new ClassInfo("a/b/Bar$1.class", getClass().getClassLoader()).getSimpleName());
    assertEquals("Local",
        new ClassInfo("a/b/Bar$1Local.class", getClass().getClassLoader()).getSimpleName());

  }
View Full Code Here

Examples of com.google.test.metric.ClassInfo

      return 1;
    }
  }

  public void testHypotheticalModelGivesTheSameNumberWithNoOverrides() throws Exception {
    ClassInfo aClass = repo.getClass(Example.class.getCanonicalName());
    ClassCost cost = computer.compute(aClass);
    int originalCost = costModel.computeClass(cost);
    int newCost = hypotheticalCostModel.computeClass(cost);
    assertEquals(originalCost, newCost);
  }
View Full Code Here

Examples of com.google.test.metric.ClassInfo

    int newCost = hypotheticalCostModel.computeClass(cost);
    assertEquals(originalCost, newCost);
  }

  public void testMethodCostGoesDownWhenADependentCostIsRemoved() throws Exception {
    ClassInfo aClass = repo.getClass(Example.class.getCanonicalName());
    ClassCost classCost = computer.compute(aClass);
    float costWithWorkInConstructor = (4 + 7) / 2;
    float costWithoutWorkInConstructor = (0 + 3) / 2;
    MethodCost constructorCost = classCost.getMethodCost("Example()");
    MethodInvocationCost instanceCost4Invocation =
View Full Code Here

Examples of com.google.test.metric.ClassInfo

            CppType.fromName(declaration.getType()), false, false);
      }
      if (leftVar != null && rightVar != null) {
        Node leftParent = leftDeclaration.getParent();
        if (leftParent instanceof ClassDeclaration) {
          ClassInfo classInfo = repository.getClass(leftDeclaration.getName());
          Type fieldType = CppType.fromName(leftDeclaration.getType());
          FieldInfo fieldInfo = new FieldInfo(classInfo, leftDeclaration
              .getName(), fieldType, false, false, false);
          operations.add(new FieldAssignment(assignmentExpression
              .getLineNumber(), leftVar, fieldInfo, rightVar));
View Full Code Here

Examples of com.google.test.metric.ClassInfo

    @Override
    public void beginVisit(ClassDeclaration classDeclaration) {
      //TODO: when the class repository is actually wired, the name of the source file should
      // be provided in the constructor
      ClassInfo classInfo = new ClassInfo(classDeclaration.getName(), false,
          null, new ArrayList<ClassInfo>(), "[unknown source]");
      classes.put(classDeclaration.getName(), classInfo);
      stack.push(classInfo);
    }
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.