emma

mbsizes[block];
              
              data[1] += instr;
              if (bcovered)
              {
                data[2] += 1;
                data[3] += instr;
              }
            }
          }
        }
        aggregates[7] = cldata.size();
        
        int coverageLineCount = 0;
        int coverageLineInstr = 0;
        
        int[] clines = cldata.keys();
        int cl = 0;
        for (int clLimit = clines.length; cl < clLimit; cl++)
        {
          int cline = clines[cl];
          int[] data = (int[])cldata.get(cline);
          
          int ltotalCount = data[0];
          int ltotalInstr = data[1];
          int lcoverageCount = data[2];
          int lcoverageInstr = data[3];
          if (lcoverageInstr > 0)
          {
            coverageLineCount += 100 * lcoverageCount / ltotalCount;
            coverageLineInstr += 100 * lcoverageInstr / ltotalInstr;
          }
        }
        aggregates[1] = coverageLineCount;
        aggregates[3] = coverageLineInstr;
        
        return aggregates[type];
      }
      return super.getAggregate(type);
    }
    return value;
  }
  
  public void accept(IItemVisitor visitor, Object ctx)
  {
    visitor.visit(this, ctx);
  }
  
  public final IItemMetadata getMetadata()
  {
    return METADATA;
  }
  
  public static IItemMetadata getTypeMetadata()
  {
    return METADATA;
  }
  
  private static final Item.ItemMetadata METADATA = new Item.ItemMetadata(3, "class", 31L);
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.ClassItem
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

import java.util.Iterator;

public abstract interface IItem
{
  public static final int COVERAGE_CLASS_COUNT = 5;
  public static final int COVERAGE_METHOD_COUNT = 4;
  public static final int COVERAGE_BLOCK_COUNT = 0;
  public static final int COVERAGE_LINE_COUNT = 1;
  public static final int COVERAGE_BLOCK_INSTR = 2;
  public static final int COVERAGE_LINE_INSTR = 3;
  public static final int TOTAL_CLASS_COUNT = 11;
  public static final int TOTAL_METHOD_COUNT = 10;
  public static final int TOTAL_BLOCK_COUNT = 6;
  public static final int TOTAL_LINE_COUNT = 7;
  public static final int TOTAL_BLOCK_INSTR = 8;
  public static final int TOTAL_SRCFILE_COUNT = 12;
  public static final int NUM_OF_AGGREGATES = 13;
  public static final int PRECISION = 100;
  
  public abstract IItem getParent();
  
  public abstract int getChildCount();
  
  public abstract Iterator getChildren();
  
  public abstract Iterator getChildren(ItemComparator paramItemComparator);
  
  public abstract String getName();
  
  public abstract IItemMetadata getMetadata();
  
  public abstract IItemAttribute getAttribute(int paramInt1, int paramInt2);
  
  public abstract int getAggregate(int paramInt);
  
  public abstract void accept(IItemVisitor paramIItemVisitor, Object paramObject);
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IItem
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

class IItemAttribute$1 {}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IItemAttribute.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

abstract class IItemAttribute$Factory$Attribute
  implements IItemAttribute
{
  private final String m_name;
  
  public String getName()
  {
    return m_name;
  }
  
  protected IItemAttribute$Factory$Attribute(String name)
  {
    if (name == null) {
      throw new IllegalArgumentException("null input: name");
    }
    m_name = name;
  }
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IItemAttribute.Factory.Attribute
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

import java.util.Comparator;

final class IItemAttribute$Factory$FractionAttribute$FractionComparator
  implements Comparator
{
  private final IItemAttribute.Factory.FractionAttribute this$0;
  
  private IItemAttribute$Factory$FractionAttribute$FractionComparator(IItemAttribute.Factory.FractionAttribute this$0)
  {
    this.this$0 = this$0;
  }
  
  IItemAttribute$Factory$FractionAttribute$FractionComparator(IItemAttribute.Factory.FractionAttribute x0, IItemAttribute.1 x1)
  {
    this(x0);
  }
  
  public int compare(Object l, Object g)
  {
    IItem il = (IItem)l;
    IItem ig = (IItem)g;
    
    double nil = il.getAggregate(this$0.m_numeratorAggregateID);
    double dil = il.getAggregate(this$0.m_denominatorAggregateID);
    
    double nig = ig.getAggregate(this$0.m_numeratorAggregateID);
    double dig = ig.getAggregate(this$0.m_denominatorAggregateID);
    
    double diff = nil * dig - nig * dil;
    
    return diff < 0.0D ? -1 : diff > 0.0D ? 1 : 0;
  }
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IItemAttribute.Factory.FractionAttribute.FractionComparator
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

import java.text.DecimalFormat;
import java.text.FieldPosition;
import java.text.NumberFormat;
import java.util.Comparator;

final class IItemAttribute$Factory$FractionAttribute
  extends IItemAttribute.Factory.Attribute
  implements IItemAttribute
{
  final int m_numeratorAggregateID;
  final int m_denominatorAggregateID;
  private final int m_scale;
  private final DecimalFormat m_format;
  private final DecimalFormat m_nFormat;
  private final FieldPosition m_fieldPosition;
  private final Comparator m_comparator;
  
  public Comparator comparator()
  {
    return m_comparator;
  }
  
  public void format(IItem item, StringBuffer appendTo)
  {
    int n = item.getAggregate(m_numeratorAggregateID);
    double n_scaled = n / m_scale;
    int d = item.getAggregate(m_denominatorAggregateID);
    
    int appendToStart = appendTo.length();
    if (d == 0) {
      m_format.format(1.0D, appendTo, m_fieldPosition);
    } else {
      m_format.format(n_scaled / d, appendTo, m_fieldPosition);
    }
    int iLimit = Math.max(1, 5 - appendTo.length() + appendToStart);
    for (int i = 0; i < iLimit; i++) {
      appendTo.append(' ');
    }
    appendTo.append('(');
    m_nFormat.format(n_scaled, appendTo, m_fieldPosition);
    appendTo.append('/');
    appendTo.append(d);
    appendTo.append(')');
  }
  
  public boolean passes(IItem item, int criterion)
  {
    int n = item.getAggregate(m_numeratorAggregateID);
    int d = item.getAggregate(m_denominatorAggregateID);
    
    return n * 100.0D >= d * m_scale * criterion;
  }
  
  private final class FractionComparator
    implements Comparator
  {
    FractionComparator(IItemAttribute.1 x1)
    {
      this();
    }
    
    public int compare(Object l, Object g)
    {
      IItem il = (IItem)l;
      IItem ig = (IItem)g;
      
      double nil = il.getAggregate(m_numeratorAggregateID);
      double dil = il.getAggregate(m_denominatorAggregateID);
      
      double nig = ig.getAggregate(m_numeratorAggregateID);
      double dig = ig.getAggregate(m_denominatorAggregateID);
      
      double diff = nil * dig - nig * dil;
      
      return diff < 0.0D ? -1 : diff > 0.0D ? 1 : 0;
    }
    
    private FractionComparator() {}
  }
  
  IItemAttribute$Factory$FractionAttribute(String name, int numeratorAggregateID, int denominatorAggregateID, int scale, int nFractionDigits)
  {
    super(name);
    
    m_numeratorAggregateID = numeratorAggregateID;
    m_denominatorAggregateID = denominatorAggregateID;
    m_scale = scale;
    
    m_format = ((DecimalFormat)NumberFormat.getPercentInstance());
    m_fieldPosition = new FieldPosition(0);
    
    m_format.setMaximumFractionDigits(0);
    
    m_nFormat = ((DecimalFormat)NumberFormat.getInstance());
    m_nFormat.setGroupingUsed(false);
    m_nFormat.setMaximumFractionDigits(nFractionDigits);
    
    m_comparator = new FractionComparator(null);
  }
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IItemAttribute.Factory.FractionAttribute
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

import java.util.Comparator;

final class IItemAttribute$Factory$NameAttribute$NameComparator
  implements Comparator
{
  IItemAttribute$Factory$NameAttribute$NameComparator(IItemAttribute.1 x0)
  {
    this();
  }
  
  public int compare(Object l, Object g)
  {
    IItem il = (IItem)l;
    IItem ig = (IItem)g;
    
    return il.getName().compareTo(ig.getName());
  }
  
  private IItemAttribute$Factory$NameAttribute$NameComparator() {}
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IItemAttribute.Factory.NameAttribute.NameComparator
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

import java.util.Comparator;

final class IItemAttribute$Factory$NameAttribute
  extends IItemAttribute.Factory.Attribute
  implements IItemAttribute
{
  private final Comparator m_comparator;
  
  public Comparator comparator()
  {
    return m_comparator;
  }
  
  public void format(IItem item, StringBuffer appendTo)
  {
    appendTo.append(item.getName());
  }
  
  public boolean passes(IItem item, int criterion)
  {
    return true;
  }
  
  private static final class NameComparator
    implements Comparator
  {
    NameComparator(IItemAttribute.1 x0)
    {
      this();
    }
    
    public int compare(Object l, Object g)
    {
      IItem il = (IItem)l;
      IItem ig = (IItem)g;
      
      return il.getName().compareTo(ig.getName());
    }
    
    private NameComparator() {}
  }
  
  IItemAttribute$Factory$NameAttribute(String name)
  {
    super(name);
    
    m_comparator = new NameComparator(null);
  }
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IItemAttribute.Factory.NameAttribute
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

import java.text.DecimalFormat;
import java.text.FieldPosition;
import java.text.NumberFormat;
import java.util.Comparator;

public abstract class IItemAttribute$Factory
{
  private static final IItemAttribute[][] ATTRIBUTES;
  
  public static IItemAttribute getAttribute(int attributeID, int unitsID)
  {
    return ATTRIBUTES[unitsID][attributeID];
  }
  
  public static IItemAttribute[] getAttributes(int unitsID)
  {
    return (IItemAttribute[])ATTRIBUTES[unitsID].clone();
  }
  
  private static abstract class Attribute
    implements IItemAttribute
  {
    private final String m_name;
    
    public String getName()
    {
      return m_name;
    }
    
    protected Attribute(String name)
    {
      if (name == null) {
        throw new IllegalArgumentException("null input: name");
      }
      m_name = name;
    }
  }
  
  private static final class NameAttribute
    extends IItemAttribute.Factory.Attribute
    implements IItemAttribute
  {
    private final Comparator m_comparator;
    
    public Comparator comparator()
    {
      return m_comparator;
    }
    
    public void format(IItem item, StringBuffer appendTo)
    {
      appendTo.append(item.getName());
    }
    
    public boolean passes(IItem item, int criterion)
    {
      return true;
    }
    
    private static final class NameComparator
      implements Comparator
    {
      NameComparator(IItemAttribute.1 x0)
      {
        this();
      }
      
      public int compare(Object l, Object g)
      {
        IItem il = (IItem)l;
        IItem ig = (IItem)g;
        
        return il.getName().compareTo(ig.getName());
      }
      
      private NameComparator() {}
    }
    
    NameAttribute(String name)
    {
      super();
      
      m_comparator = new NameComparator(null);
    }
  }
  
  private static final class FractionAttribute
    extends IItemAttribute.Factory.Attribute
    implements IItemAttribute
  {
    final int m_numeratorAggregateID;
    final int m_denominatorAggregateID;
    private final int m_scale;
    private final DecimalFormat m_format;
    private final DecimalFormat m_nFormat;
    private final FieldPosition m_fieldPosition;
    private final Comparator m_comparator;
    
    public Comparator comparator()
    {
      return m_comparator;
    }
    
    public void format(IItem item, StringBuffer appendTo)
    {
      int n = item.getAggregate(m_numeratorAggregateID);
      double n_scaled = n / m_scale;
      int d = item.getAggregate(m_denominatorAggregateID);
      
      int appendToStart = appendTo.length();
      if (d == 0) {
        m_format.format(1.0D, appendTo, m_fieldPosition);
      } else {
        m_format.format(n_scaled / d, appendTo, m_fieldPosition);
      }
      int iLimit = Math.max(1, 5 - appendTo.length() + appendToStart);
      for (int i = 0; i < iLimit; i++) {
        appendTo.append(' ');
      }
      appendTo.append('(');
      m_nFormat.format(n_scaled, appendTo, m_fieldPosition);
      appendTo.append('/');
      appendTo.append(d);
      appendTo.append(')');
    }
    
    public boolean passes(IItem item, int criterion)
    {
      int n = item.getAggregate(m_numeratorAggregateID);
      int d = item.getAggregate(m_denominatorAggregateID);
      
      return n * 100.0D >= d * m_scale * criterion;
    }
    
    private final class FractionComparator
      implements Comparator
    {
      FractionComparator(IItemAttribute.1 x1)
      {
        this();
      }
      
      public int compare(Object l, Object g)
      {
        IItem il = (IItem)l;
        IItem ig = (IItem)g;
        
        double nil = il.getAggregate(m_numeratorAggregateID);
        double dil = il.getAggregate(m_denominatorAggregateID);
        
        double nig = ig.getAggregate(m_numeratorAggregateID);
        double dig = ig.getAggregate(m_denominatorAggregateID);
        
        double diff = nil * dig - nig * dil;
        
        return diff < 0.0D ? -1 : diff > 0.0D ? 1 : 0;
      }
      
      private FractionComparator() {}
    }
    
    FractionAttribute(String name, int numeratorAggregateID, int denominatorAggregateID, int scale, int nFractionDigits)
    {
      super();
      
      m_numeratorAggregateID = numeratorAggregateID;
      m_denominatorAggregateID = denominatorAggregateID;
      m_scale = scale;
      
      m_format = ((DecimalFormat)NumberFormat.getPercentInstance());
      m_fieldPosition = new FieldPosition(0);
      
      m_format.setMaximumFractionDigits(0);
      
      m_nFormat = ((DecimalFormat)NumberFormat.getInstance());
      m_nFormat.setGroupingUsed(false);
      m_nFormat.setMaximumFractionDigits(nFractionDigits);
      
      m_comparator = new FractionComparator(null);
    }
  }
  
  static
  {
    IItemAttribute nameAttribute = new NameAttribute("name");
    
    IItemAttribute classCoverageAttribute = new FractionAttribute("class, %", 5, 11, 1, 0);
    IItemAttribute methodCoverageAttribute = new FractionAttribute("method, %", 4, 10, 1, 0);
    
    ATTRIBUTES = new IItemAttribute[][] { { nameAttribute, classCoverageAttribute, methodCoverageAttribute, new FractionAttribute("block, %", 0, 6, 1, 0), new FractionAttribute("line, %", 1, 7, 100, 1) }, { nameAttribute, classCoverageAttribute, methodCoverageAttribute, new FractionAttribute("block, %", 2, 8, 1, 0), new FractionAttribute("line, %", 3, 7, 100, 1) } };
  }
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IItemAttribute.Factory
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

import java.text.DecimalFormat;
import java.text.FieldPosition;
import java.text.NumberFormat;
import java.util.Comparator;

public abstract interface IItemAttribute
{
  public static final int ATTRIBUTE_NAME_ID = 0;
  public static final int ATTRIBUTE_CLASS_COVERAGE_ID = 1;
  public static final int ATTRIBUTE_METHOD_COVERAGE_ID = 2;
  public static final int ATTRIBUTE_BLOCK_COVERAGE_ID = 3;
  public static final int ATTRIBUTE_LINE_COVERAGE_ID = 4;
  public static final int UNITS_COUNT = 0;
  public static final int UNITS_INSTR = 1;
  
  public abstract Comparator comparator();
  
  public abstract String getName();
  
  public abstract void format(IItem paramIItem, StringBuffer paramStringBuffer);
  
  public abstract boolean passes(IItem paramIItem, int paramInt);
  
  public static abstract class Factory
  {
    private static final IItemAttribute[][] ATTRIBUTES;
    
    public static IItemAttribute getAttribute(int attributeID, int unitsID)
    {
      return ATTRIBUTES[unitsID][attributeID];
    }
    
    public static IItemAttribute[] getAttributes(int unitsID)
    {
      return (IItemAttribute[])ATTRIBUTES[unitsID].clone();
    }
    
    private static abstract class Attribute
      implements IItemAttribute
    {
      private final String m_name;
      
      public String getName()
      {
        return m_name;
      }
      
      protected Attribute(String name)
      {
        if (name == null) {
          throw new IllegalArgumentException("null input: name");
        }
        m_name = name;
      }
    }
    
    private static final class NameAttribute
      extends IItemAttribute.Factory.Attribute
      implements IItemAttribute
    {
      private final Comparator m_comparator;
      
      public Comparator comparator()
      {
        return m_comparator;
      }
      
      public void format(IItem item, StringBuffer appendTo)
      {
        appendTo.append(item.getName());
      }
      
      public boolean passes(IItem item, int criterion)
      {
        return true;
      }
      
      private static final class NameComparator
        implements Comparator
      {
        NameComparator(IItemAttribute.1 x0)
        {
          this();
        }
        
        public int compare(Object l, Object g)
        {
          IItem il = (IItem)l;
          IItem ig = (IItem)g;
          
          return il.getName().compareTo(ig.getName());
        }
        
        private NameComparator() {}
      }
      
      NameAttribute(String name)
      {
        super();
        
        m_comparator = new NameComparator(null);
      }
    }
    
    private static final class FractionAttribute
      extends IItemAttribute.Factory.Attribute
      implements IItemAttribute
    {
      final int m_numeratorAggregateID;
      final int m_denominatorAggregateID;
      private final int m_scale;
      private final DecimalFormat m_format;
      private final DecimalFormat m_nFormat;
      private final FieldPosition m_fieldPosition;
      private final Comparator m_comparator;
      
      public Comparator comparator()
      {
        return m_comparator;
      }
      
      public void format(IItem item, StringBuffer appendTo)
      {
        int n = item.getAggregate(m_numeratorAggregateID);
        double n_scaled = n / m_scale;
        int d = item.getAggregate(m_denominatorAggregateID);
        
        int appendToStart = appendTo.length();
        if (d == 0) {
          m_format.format(1.0D, appendTo, m_fieldPosition);
        } else {
          m_format.format(n_scaled / d, appendTo, m_fieldPosition);
        }
        int iLimit = Math.max(1, 5 - appendTo.length() + appendToStart);
        for (int i = 0; i < iLimit; i++) {
          appendTo.append(' ');
        }
        appendTo.append('(');
        m_nFormat.format(n_scaled, appendTo, m_fieldPosition);
        appendTo.append('/');
        appendTo.append(d);
        appendTo.append(')');
      }
      
      public boolean passes(IItem item, int criterion)
      {
        int n = item.getAggregate(m_numeratorAggregateID);
        int d = item.getAggregate(m_denominatorAggregateID);
        
        return n * 100.0D >= d * m_scale * criterion;
      }
      
      private final class FractionComparator
        implements Comparator
      {
        FractionComparator(IItemAttribute.1 x1)
        {
          this();
        }
        
        public int compare(Object l, Object g)
        {
          IItem il = (IItem)l;
          IItem ig = (IItem)g;
          
          double nil = il.getAggregate(m_numeratorAggregateID);
          double dil = il.getAggregate(m_denominatorAggregateID);
          
          double nig = ig.getAggregate(m_numeratorAggregateID);
          double dig = ig.getAggregate(m_denominatorAggregateID);
          
          double diff = nil * dig - nig * dil;
          
          return diff < 0.0D ? -1 : diff > 0.0D ? 1 : 0;
        }
        
        private FractionComparator() {}
      }
      
      FractionAttribute(String name, int numeratorAggregateID, int denominatorAggregateID, int scale, int nFractionDigits)
      {
        super();
        
        m_numeratorAggregateID = numeratorAggregateID;
        m_denominatorAggregateID = denominatorAggregateID;
        m_scale = scale;
        
        m_format = ((DecimalFormat)NumberFormat.getPercentInstance());
        m_fieldPosition = new FieldPosition(0);
        
        m_format.setMaximumFractionDigits(0);
        
        m_nFormat = ((DecimalFormat)NumberFormat.getInstance());
        m_nFormat.setGroupingUsed(false);
        m_nFormat.setMaximumFractionDigits(nFractionDigits);
        
        m_comparator = new FractionComparator(null);
      }
    }
    
    static
    {
      IItemAttribute nameAttribute = new NameAttribute("name");
      
      IItemAttribute classCoverageAttribute = new FractionAttribute("class, %", 5, 11, 1, 0);
      IItemAttribute methodCoverageAttribute = new FractionAttribute("method, %", 4, 10, 1, 0);
      
      ATTRIBUTES = new IItemAttribute[][] { { nameAttribute, classCoverageAttribute, methodCoverageAttribute, new FractionAttribute("block, %", 0, 6, 1, 0), new FractionAttribute("line, %", 1, 7, 100, 1) }, { nameAttribute, classCoverageAttribute, methodCoverageAttribute, new FractionAttribute("block, %", 2, 8, 1, 0), new FractionAttribute("line, %", 3, 7, 100, 1) } };
    }
  }
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IItemAttribute
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

public abstract class IItemMetadata$Factory
{
  public static IItemMetadata getTypeMetadata(int typeID)
  {
    if ((typeID < 0) || (typeID > 4)) {
      throw new IllegalArgumentException("invalid type ID: " + typeID);
    }
    return METADATA[typeID];
  }
  
  public static IItemMetadata[] getAllTypes()
  {
    return METADATA;
  }
  
  private static final IItemMetadata[] METADATA = { AllItem.getTypeMetadata(), PackageItem.getTypeMetadata(), SrcFileItem.getTypeMetadata(), ClassItem.getTypeMetadata(), MethodItem.getTypeMetadata() };
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IItemMetadata.Factory
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

public abstract interface IItemMetadata
{
  public static final int TYPE_ID_ALL = 0;
  public static final int TYPE_ID_PACKAGE = 1;
  public static final int TYPE_ID_SRCFILE = 2;
  public static final int TYPE_ID_CLASS = 3;
  public static final int TYPE_ID_METHOD = 4;
  
  public abstract int getTypeID();
  
  public abstract String getTypeName();
  
  public abstract long getAttributeIDs();
  
  public static abstract class Factory
  {
    public static IItemMetadata getTypeMetadata(int typeID)
    {
      if ((typeID < 0) || (typeID > 4)) {
        throw new IllegalArgumentException("invalid type ID: " + typeID);
      }
      return METADATA[typeID];
    }
    
    public static IItemMetadata[] getAllTypes()
    {
      return METADATA;
    }
    
    private static final IItemMetadata[] METADATA = { AllItem.getTypeMetadata(), PackageItem.getTypeMetadata(), SrcFileItem.getTypeMetadata(), ClassItem.getTypeMetadata(), MethodItem.getTypeMetadata() };
  }
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IItemMetadata
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

public abstract interface IItemVisitor
{
  public abstract Object visit(AllItem paramAllItem, Object paramObject);
  
  public abstract Object visit(PackageItem paramPackageItem, Object paramObject);
  
  public abstract Object visit(SrcFileItem paramSrcFileItem, Object paramObject);
  
  public abstract Object visit(ClassItem paramClassItem, Object paramObject);
  
  public abstract Object visit(MethodItem paramMethodItem, Object paramObject);
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IItemVisitor
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

import com.vladium.emma.data.ICoverageData;
import com.vladium.emma.data.IMetaData;

public abstract class IReportDataModel$Factory
{
  public static IReportDataModel create(IMetaData mdata, ICoverageData cdata)
  {
    return new ReportDataModel(mdata, cdata);
  }
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IReportDataModel.Factory
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

import com.vladium.emma.data.ICoverageData;
import com.vladium.emma.data.IMetaData;

public abstract interface IReportDataModel
{
  public abstract IReportDataView getView(int paramInt);
  
  public static abstract class Factory
  {
    public static IReportDataModel create(IMetaData mdata, ICoverageData cdata)
    {
      return new ReportDataModel(mdata, cdata);
    }
  }
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IReportDataModel
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

public abstract interface IReportDataView
{
  public static final int HIER_CLS_VIEW = 0;
  public static final int HIER_SRC_VIEW = 1;
  
  public abstract IItem getRoot();
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IReportDataView
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

import com.vladium.emma.EMMARuntimeException;
import com.vladium.emma.data.ICoverageData;
import com.vladium.emma.data.IMetaData;
import com.vladium.util.IProperties;

public abstract interface IReportGenerator
{
  public abstract String getType();
  
  public abstract void process(IMetaData paramIMetaData, ICoverageData paramICoverageData, SourcePathCache paramSourcePathCache, IProperties paramIProperties)
    throws EMMARuntimeException;
  
  public abstract void cleanup();
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IReportGenerator
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

public abstract interface IReportProperties
{
  public static final String PREFIX = "report.";
  public static final String OUT_ENCODING = "out.encoding";
  public static final String OUT_DIR = "out.dir";
  public static final String OUT_FILE = "out.file";
  public static final String UNITS_TYPE = "units";
  public static final String COUNT_UNITS = "count";
  public static final String INSTR_UNITS = "instr";
  public static final String VIEW_TYPE = "view";
  public static final String CLS_VIEW = "class";
  public static final String SRC_VIEW = "source";
  public static final String HIDE_CLASSES = "hideclasses";
  public static final String DEPTH = "depth";
  public static final String DEPTH_ALL = "all";
  public static final String DEPTH_PACKAGE = "package";
  public static final String DEPTH_SRCFILE = "source";
  public static final String DEPTH_CLASS = "class";
  public static final String DEPTH_METHOD = "method";
  public static final String COLUMNS = "columns";
  public static final String ITEM_NAME_COLUMN = "name";
  public static final String CLASS_COVERAGE_COLUMN = "class";
  public static final String METHOD_COVERAGE_COLUMN = "method";
  public static final String BLOCK_COVERAGE_COLUMN = "block";
  public static final String LINE_COVERAGE_COLUMN = "line";
  public static final String SORT = "sort";
  public static final char ASC = '+';
  public static final char DESC = '-';
  public static final String METRICS = "metrics";
  public static final char MSEPARATOR = ':';
  public static final String DEFAULT_UNITS_TYPE = "instr";
  public static final String DEFAULT_VIEW_TYPE = "source";
  public static final String DEFAULT_HIDE_CLASSES = "true";
  public static final String DEFAULT_DEPTH = "package";
  public static final String DEFAULT_COLUMNS = "class,method,block,line,name";
  public static final String DEFAULT_SORT = "+block,+name";
  public static final String DEFAULT_METRICS = "method:70,block:80,line:80,class:100";
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.IReportProperties
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

public final class Item$ItemMetadata
  implements IItemMetadata
{
  private final int m_typeID;
  private final String m_typeName;
  private final long m_attributeIDs;
  
  public int getTypeID()
  {
    return m_typeID;
  }
  
  public String getTypeName()
  {
    return m_typeName;
  }
  
  public long getAttributeIDs()
  {
    return m_attributeIDs;
  }
  
  Item$ItemMetadata(int typeID, String typeName, long attributeIDs)
  {
    m_typeID = typeID;
    m_typeName = typeName;
    m_attributeIDs = attributeIDs;
  }
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.Item.ItemMetadata
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

abstract class Item
  implements IItem
{
  protected final IItem m_parent;
  protected final int[] m_aggregates;
  private final List m_children;
  
  public final int getChildCount()
  {
    return m_children.size();
  }
  
  public final IItem getParent()
  {
    return m_parent;
  }
  
  public final Iterator getChildren()
  {
    return m_children.iterator();
  }
  
  public final Iterator getChildren(ItemComparator order)
  {
    if (order == null) {
      return getChildren();
    }
    IItem[] items = new IItem[m_children.size()];
    m_children.toArray(items);
    
    Arrays.sort(items, order);
    
    return Arrays.asList(items).iterator();
  }
  
  public final IItemAttribute getAttribute(int attributeID, int unitsID)
  {
    if ((getMetadata().getAttributeIDs() & 1 << attributeID) == 0L) {
      return null;
    }
    return IItemAttribute.Factory.getAttribute(attributeID, unitsID);
  }
  
  public int getAggregate(int type)
  {
    int[] aggregates = m_aggregates;
    int value = aggregates[type];
    if (value < 0)
    {
      value = 0;
      for (Iterator children = m_children.iterator(); children.hasNext();) {
        value += ((IItem)children.next()).getAggregate(type);
      }
      aggregates[type] = value;
      
      return value;
    }
    return value;
  }
  
  protected static final class ItemMetadata
    implements IItemMetadata
  {
    private final int m_typeID;
    private final String m_typeName;
    private final long m_attributeIDs;
    
    public int getTypeID()
    {
      return m_typeID;
    }
    
    public String getTypeName()
    {
      return m_typeName;
    }
    
    public long getAttributeIDs()
    {
      return m_attributeIDs;
    }
    
    ItemMetadata(int typeID, String typeName, long attributeIDs)
    {
      m_typeID = typeID;
      m_typeName = typeName;
      m_attributeIDs = attributeIDs;
    }
  }
  
  protected void addChild(IItem item)
  {
    if (item == null) {
      throw new IllegalArgumentException("null input: item");
    }
    m_children.add(item);
  }
  
  Item(IItem parent)
  {
    m_parent = parent;
    m_children = new ArrayList();
    
    m_aggregates = new int[13];
    for (int i = 0; i < m_aggregates.length; i++) {
      m_aggregates[i] = -1;
    }
  }
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.Item
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

class ItemComparator$1 {}

/* Location:
 * Qualified Name:     com.vladium.emma.report.ItemComparator.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

import java.util.Comparator;

final class ItemComparator$Factory$CompositeComparator
  implements ItemComparator
{
  private final Comparator[] m_comparators;
  
  public int compare(Object l, Object g)
  {
    for (int c = 0; c < m_comparators.length; c++)
    {
      int diff = m_comparators[c].compare(l, g);
      if (diff != 0) {
        return diff;
      }
    }
    return 0;
  }
  
  ItemComparator$Factory$CompositeComparator(Comparator[] comparators)
  {
    m_comparators = comparators;
  }
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.ItemComparator.Factory.CompositeComparator
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

final class ItemComparator$Factory$NullComparator
  implements ItemComparator
{
  ItemComparator$Factory$NullComparator(ItemComparator.1 x0)
  {
    this();
  }
  
  public int compare(Object l, Object g)
  {
    return 0;
  }
  
  private ItemComparator$Factory$NullComparator() {}
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.ItemComparator.Factory.NullComparator
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

import java.util.Comparator;

final class ItemComparator$Factory$ReverseComparator
  implements ItemComparator
{
  private final Comparator m_comparator;
  
  public int compare(Object l, Object g)
  {
    return m_comparator.compare(g, l);
  }
  
  ItemComparator$Factory$ReverseComparator(Comparator comparator)
  {
    m_comparator = comparator;
  }
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.ItemComparator.Factory.ReverseComparator
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

import java.util.Comparator;

public abstract class ItemComparator$Factory
{
  public static ItemComparator create(int[] attributeIDsWithDir, int unitsID)
  {
    if (attributeIDsWithDir == null) {
      throw new IllegalArgumentException("null input: attributeIDsWithDir");
    }
    if (attributeIDsWithDir.length == 0) {
      return ItemComparator.NULL_COMPARATOR;
    }
    Comparator[] comparators = new Comparator[attributeIDsWithDir.length >> 1];
    for (int a = 0; a < attributeIDsWithDir.length; a += 2)
    {
      int attributeID = attributeIDsWithDir[a];
      
      Comparator comparator = IItemAttribute.Factory.getAttribute(attributeID, unitsID).comparator();
      comparators[(a >> 1)] = (attributeIDsWithDir[(a + 1)] < 0 ? new ReverseComparator(comparator) : comparator);
    }
    return new CompositeComparator(comparators);
  }
  
  private static final class NullComparator
    implements ItemComparator
  {
    NullComparator(ItemComparator.1 x0)
    {
      this();
    }
    
    public int compare(Object l, Object g)
    {
      return 0;
    }
    
    private NullComparator() {}
  }
  
  private static final class ReverseComparator
    implements ItemComparator
  {
    private final Comparator m_comparator;
    
    public int compare(Object l, Object g)
    {
      return m_comparator.compare(g, l);
    }
    
    ReverseComparator(Comparator comparator)
    {
      m_comparator = comparator;
    }
  }
  
  private static final class CompositeComparator
    implements ItemComparator
  {
    private final Comparator[] m_comparators;
    
    public int compare(Object l, Object g)
    {
      for (int c = 0; c < m_comparators.length; c++)
      {
        int diff = m_comparators[c].compare(l, g);
        if (diff != 0) {
          return diff;
        }
      }
      return 0;
    }
    
    CompositeComparator(Comparator[] comparators)
    {
      m_comparators = comparators;
    }
  }
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.ItemComparator.Factory
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

import java.util.Comparator;

public abstract interface ItemComparator
  extends Comparator
{
  public static final ItemComparator NULL_COMPARATOR = new ItemComparator.Factory.NullComparator(null);
  
  public static abstract class Factory
  {
    public static ItemComparator create(int[] attributeIDsWithDir, int unitsID)
    {
      if (attributeIDsWithDir == null) {
        throw new IllegalArgumentException("null input: attributeIDsWithDir");
      }
      if (attributeIDsWithDir.length == 0) {
        return ItemComparator.NULL_COMPARATOR;
      }
      Comparator[] comparators = new Comparator[attributeIDsWithDir.length >> 1];
      for (int a = 0; a < attributeIDsWithDir.length; a += 2)
      {
        int attributeID = attributeIDsWithDir[a];
        
        Comparator comparator = IItemAttribute.Factory.getAttribute(attributeID, unitsID).comparator();
        comparators[(a >> 1)] = (attributeIDsWithDir[(a + 1)] < 0 ? new ReverseComparator(comparator) : comparator);
      }
      return new CompositeComparator(comparators);
    }
    
    private static final class NullComparator
      implements ItemComparator
    {
      NullComparator(ItemComparator.1 x0)
      {
        this();
      }
      
      public int compare(Object l, Object g)
      {
        return 0;
      }
      
      private NullComparator() {}
    }
    
    private static final class ReverseComparator
      implements ItemComparator
    {
      private final Comparator m_comparator;
      
      public int compare(Object l, Object g)
      {
        return m_comparator.compare(g, l);
      }
      
      ReverseComparator(Comparator comparator)
      {
        m_comparator = comparator;
      }
    }
    
    private static final class CompositeComparator
      implements ItemComparator
    {
      private final Comparator[] m_comparators;
      
      public int compare(Object l, Object g)
      {
        for (int c = 0; c < m_comparators.length; c++)
        {
          int diff = m_comparators[c].compare(l, g);
          if (diff != 0) {
            return diff;
          }
        }
        return 0;
      }
      
      CompositeComparator(Comparator[] comparators)
      {
        m_comparators = comparators;
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.vladium.emma.report.ItemComparator
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.emma.report;

import com.vladium.emma.data.MethodDescriptor;
import com.vladium.util.Descriptors;
import com.vladium.util.IntObjectMap;

public final class MethodItem
  extends Item
{
  private final int m_ID;
  private final String m_name;
  private final String m_descriptor;
  private final int m_firstLine;
  private transient String m_userName;
  
  public MethodItem(IItem parent, int ID, String name, String descriptor, int firstLine)
  {
    super(parent);
    
    m_ID = ID;
    m_name = name;
    m_descriptor = descriptor;
    m_firstLine = firstLine;
  }
  
  public String getName()
  {
    if (m_userName == null) {
      m_userName = Descriptors.methodVMNameToJavaName(m_parent.getName(), m_name, m_descriptor, true, true, true);
    }
    return m_userName;
  }
  
  public int getID()
  {
    return m_ID;
  }
  
  public int getFirstLine()
  {
    return m_firstLine;
  }
  
  public int getAggregate(int type)
  {
    int[] aggregates = m_aggregates;
    
    int value = aggregates[type];
    if (value < 0)
    {
      ClassItem parent = (ClassItem)m_parent;
      
      MethodDescriptor method = m_cls.getMethods()[m_ID];
      int status = method.getStatus();
      if ((status & 0xE) != 0)
      {
        for (int i = 0; i < aggregates.length; i++) {
          aggregates[i] = 0;
        }
      }
      else
      {
        boolean lineInfo = (status & 0x1) == 0;
        boolean[] coverage = m_coverage != null ? m_coverage[m_ID] : 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd