| 1 19 20 package edu.umd.cs.findbugs.ba.obl; 21 22 import org.apache.bcel.generic.ObjectType; 23 24 import edu.umd.cs.findbugs.ba.ObjectTypeFactory; 25 26 37 public class Obligation { 38 private final String className; 39 private final ObjectType type; 40 private final int id; 41 42 public Obligation(String className, int id) { 43 this.className = className; 44 this.type = ObjectTypeFactory.getInstance(className); 45 this.id = id; 46 } 47 48 public String getClassName() { 49 return className; 50 } 51 52 public ObjectType getType() { 53 return type; 54 } 55 56 public int getId() { 57 return id; 58 } 59 60 @Override  61 public String toString() { 62 int lastDot = className.lastIndexOf('.'); 64 return lastDot >= 0 ? className.substring(lastDot+1) : className; 65 } 66 } 67 68 | Popular Tags |