1 25 26 package net.sourceforge.cobertura.instrument; 27 28 import java.io.File ; 29 30 import net.sourceforge.cobertura.util.ArchiveUtil; 31 32 38 class CoberturaFile extends File 39 { 40 41 private static final long serialVersionUID = 0L; 42 43 private String baseDir; 44 private String pathname; 45 46 CoberturaFile(String baseDir, String pathname) 47 { 48 super(baseDir, pathname); 49 this.baseDir = baseDir; 50 this.pathname = pathname; 51 } 52 53 public String getBaseDir() 54 { 55 return baseDir; 56 } 57 58 public String getPathname() 59 { 60 return pathname; 61 } 62 63 67 boolean isArchive() 68 { 69 if (!isFile()) 70 { 71 return false; 72 } 73 return ArchiveUtil.isArchive(pathname); 74 } 75 76 80 boolean isClass() 81 { 82 return isFile() && pathname.endsWith(".class"); 83 } 84 85 public String toString() 86 { 87 return "pathname=" + pathname + " and baseDir=" + baseDir; 88 } 89 90 } 91 | Popular Tags |