Package edu.pku.sei.metric.source

Examples of edu.pku.sei.metric.source.TypeMetric


    }

    @Override
    protected void calculate() {
      assert source instanceof TypeMetric : "The calculation is set on Type";
      TypeMetric metricElement = (TypeMetric) source;

      IType iType = (IType) metricElement.getJavaElement();
      ITypeHierarchy hierarchy = metricElement.getHierarchy();
      IType[] supers = hierarchy.getAllSuperclasses(iType);
     
      int overridden = 0;
      try {
        IMethod[] myMethods = iType.getMethods();
View Full Code Here


    }

    @Override
    protected void calculate() {
      assert source instanceof TypeMetric : "The calculation is set on Type";
      TypeMetric metricElement = (TypeMetric) source;

      int sFieldNumber = 0;
      int iFieldNumber = 0;

      try {
        IField[] fields = ((IType) metricElement.getJavaElement())
            .getFields();
        for (int i = 0; i < fields.length; i++) {
          if ((fields[i].getFlags() & Flags.AccStatic) != 0) {
            sFieldNumber++;
          } else {
View Full Code Here

    }

    @Override
    protected void calculate() {
      assert source instanceof TypeMetric : "The calculation must be set on Type";
      TypeMetric metricElement = (TypeMetric) source;
      IType iType = (IType) metricElement.getJavaElement();

      ITypeHierarchy hierarchy = metricElement.getHierarchy();
     
      IType[] supers = hierarchy.getAllSuperclasses(iType);
      IType[] subs = hierarchy.getSubtypes(iType);
      values[0].setValue(supers.length);
      values[1].setValue(subs.length);
View Full Code Here

    }

    @Override
    protected void calculate() {
      assert source instanceof TypeMetric : "The calculation is set on Type";
      TypeMetric metricElement = (TypeMetric) source;

      int sMethodCount = 0;
      int iMethodCount = 0;
      try {
        IMethod[] methods = ((IType) metricElement.getJavaElement())
            .getMethods();
        for (int i = 0; i < methods.length; i++) {
          if ((methods[i].getFlags() & Flags.AccStatic) != 0) {
            sMethodCount++;
          } else {
View Full Code Here

TOP

Related Classes of edu.pku.sei.metric.source.TypeMetric

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.