1 32 33 package com.jeantessier.metrics; 34 35 import java.util.*; 36 37 import com.jeantessier.classreader.*; 38 39 public class MetricsEvent extends EventObject { 40 private Classfile classfile; 41 private Method_info method; 42 private Metrics metrics; 43 private int size; 44 45 public MetricsEvent(Object source) { 46 this(source, null, null, null, 0); 47 } 48 49 public MetricsEvent(Object source, Classfile classfile) { 50 this(source, classfile, null, null, 0); 51 } 52 53 public MetricsEvent(Object source, Classfile classfile, Metrics metrics) { 54 this(source, classfile, null, metrics, 0); 55 } 56 57 public MetricsEvent(Object source, Method_info method) { 58 this(source, method.getClassfile(), method, null, 0); 59 } 60 61 public MetricsEvent(Object source, Method_info method, Metrics metrics) { 62 this(source, method.getClassfile(), method, metrics, 0); 63 } 64 65 public MetricsEvent(Object source, int size) { 66 this(source, null, null, null, size); 67 } 68 69 public MetricsEvent(Object source, Classfile classfile, Method_info method, Metrics metrics, int size) { 70 super(source); 71 72 this.classfile = classfile; 73 this.method = method; 74 this.metrics = metrics; 75 this.size = size; 76 } 77 78 public Classfile getClassfile() { 79 return classfile; 80 } 81 82 public Method_info getMethod() { 83 return method; 84 } 85 86 public Metrics getMetrics() { 87 return metrics; 88 } 89 90 public int getSize() { 91 return size; 92 } 93 } 94 | Popular Tags |