1 19 20 25 26 27 package soot.tagkit; 28 29 import java.io.UnsupportedEncodingException ; 30 import soot.*; 31 32 public class SourceFileTag implements Tag 33 { 34 String sourceFile; 35 String absolutePath; 36 37 public SourceFileTag(String sourceFile) 38 { 39 this.sourceFile = sourceFile; 40 } 41 42 public SourceFileTag(){ 43 } 44 45 public String getName() 46 { 47 return "SourceFileTag"; 48 } 49 50 public byte[] getValue() 51 { 52 try { 53 return sourceFile.getBytes("UTF8"); 54 } catch (UnsupportedEncodingException e) { 55 return new byte[0]; 56 } 57 } 58 59 public void setSourceFile(String srcFile){ 60 sourceFile = srcFile; 61 } 62 public String getSourceFile() 63 { 64 return sourceFile; 65 } 66 67 public void setAbsolutePath(String path){ 68 absolutePath = path; 69 } 70 71 public String getAbsolutePath(){ 72 return absolutePath; 73 } 74 75 public String toString() 76 { 77 return sourceFile; 78 } 79 } 80 81 | Popular Tags |