b374ff54223afc17babeb5c0693b60c219582130
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / builder / PHPIdentifierLocation.java
1 package net.sourceforge.phpeclipse.builder;
2
3 import net.sourceforge.phpeclipse.obfuscator.PHPIdentifier;
4
5 /**
6  *
7  */
8 public class PHPIdentifierLocation extends PHPIdentifier {
9   private String fClassname;
10   private String fFilename;
11         private int fOffset;
12         private int fPHPDocLength;
13         private int fPHPDocOffset;
14         private String fUsage;
15
16   public PHPIdentifierLocation(String identifier, int type, String filename) {
17     this(identifier, type, filename, null);
18   }
19
20         public PHPIdentifierLocation(String identifier, int type, String filename, String classname) {
21                 super(identifier, type);
22                 fFilename = filename;
23                 fClassname = classname;
24                 fOffset = -1;
25                 fPHPDocLength = -1;
26                 fPHPDocOffset = -1;
27                 fUsage = null;
28         }
29   /* (non-Javadoc)
30    * @see java.lang.Object#equals(java.lang.Object)
31    */
32   public boolean equals(Object obj) {
33                 if (!(obj instanceof PHPIdentifierLocation)) {
34                         return false;
35                 }
36     return super.equals(obj)&&fFilename.equals(((PHPIdentifierLocation)obj).fFilename);
37   }
38
39   /**
40    * @return
41    */
42   public String getClassname() {
43     return fClassname;
44   }
45
46   /**
47    * @return
48    */
49   public String getFilename() {
50     return fFilename;
51   }
52
53   /**
54    * @return
55    */
56   public int getOffset() {
57     return fOffset;
58   }
59
60   /**
61    * @return
62    */
63   public int getPHPDocLength() {
64     return fPHPDocLength;
65   }
66
67   /**
68    * @return
69    */
70   public int getPHPDocOffset() {
71     return fPHPDocOffset;
72   }
73
74   /**
75    * @return
76    */
77   public String getUsage() {
78     return fUsage;
79   }
80
81   /**
82    * @param string
83    */
84   public void setClassname(String string) {
85     fClassname = string;
86   }
87
88   /**
89    * @param string
90    */
91   public void setFilename(String string) {
92     fFilename = string;
93   }
94
95   /**
96    * @param i
97    */
98   public void setOffset(int i) {
99     fOffset = i;
100   }
101
102   /**
103    * @param i
104    */
105   public void setPHPDocLength(int i) {
106     fPHPDocLength = i;
107   }
108
109   /**
110    * @param i
111    */
112   public void setPHPDocOffset(int i) {
113     fPHPDocOffset = i;
114   }
115
116   /**
117    * @param string
118    */
119   public void setUsage(String string) {
120     fUsage = string;
121   }
122
123   /* (non-Javadoc)
124    * @see java.lang.Object#toString()
125    */
126   public String toString() {
127     return super.toString()+"\n"+fFilename;
128   }
129
130 }