1 36 37 package com.caucho.doc.javadoc; 38 39 import com.caucho.log.Log; 40 import com.caucho.util.CharBuffer; 41 import com.caucho.util.L10N; 42 43 import java.util.logging.Logger ; 44 45 48 public class JavadocFile { 49 static protected final Logger log = Log.open(JavadocFile.class); 50 static final L10N L = new L10N(JavadocFile.class); 51 52 private Api _api; 53 private int _id = Integer.MAX_VALUE; 54 private String _path; 55 56 private String _href; 57 58 61 JavadocFile(Api api, int id, String path) 62 { 63 _api = api; 64 _id = id; 65 _path = path; 66 init(); 67 } 68 69 JavadocFile(Api api, String path) 70 { 71 _api = api; 72 _path = path; 73 init(); 74 } 75 76 private void init() 77 { 78 CharBuffer cb = CharBuffer.allocate(); 79 Api api = getApi(); 80 _href = api.getLocationHref(_path); 81 } 82 83 public Api getApi() 84 { 85 return _api; 86 } 87 88 int getId() 89 { 90 if (_id == Integer.MAX_VALUE) 91 throw new RuntimeException ("_id not init in JavadocFile"); 92 return _id; 93 } 94 95 public String getPath() 96 { 97 return _path; 98 } 99 100 public String getHref() 101 { 102 return _href; 103 } 104 105 } 106 107 | Popular Tags |