1 package net.sourceforge.phpeclipse.builder;
 
   3 import net.sourceforge.phpeclipse.obfuscator.PHPIdentifier;
 
   8 public class PHPIdentifierLocation extends PHPIdentifier implements Comparable {
 
   9   final public static int UNDEFINED_MATCH = 0;
 
  10   final public static int PATTERN_MATCH = 1;
 
  11   final public static int EXACT_MATCH = 2;
 
  15   private String fClassname;
 
  17   private String fFilename;
 
  21   private int fPHPDocLength;
 
  23   private int fPHPDocOffset;
 
  25   private String fUsage;
 
  27   public PHPIdentifierLocation(String identifier, int type, String filename) {
 
  28     this(identifier, type, filename, null);
 
  31   public PHPIdentifierLocation(String identifier, int type, String filename,
 
  33     super(identifier, type);
 
  35     fClassname = classname;
 
  45    * @see java.lang.Object#equals(java.lang.Object)
 
  47   public boolean equals(Object obj) {
 
  48     if (!(obj instanceof PHPIdentifierLocation)) {
 
  51     return super.equals(obj)
 
  52         && fFilename.equals(((PHPIdentifierLocation) obj).fFilename);
 
  58   public String getClassname() {
 
  65   public String getFilename() {
 
  72   public int getOffset() {
 
  79   public int getPHPDocLength() {
 
  86   public int getPHPDocOffset() {
 
  93   public String getUsage() {
 
 100   public void setClassname(String string) {
 
 107   public void setFilename(String string) {
 
 114   public void setOffset(int i) {
 
 121   public void setPHPDocLength(int i) {
 
 128   public void setPHPDocOffset(int i) {
 
 135   public void setUsage(String string) {
 
 142    * @see java.lang.Object#toString()
 
 144   public String toString() {
 
 147     case UNDEFINED_MATCH:
 
 151       result = " [pattern include][";
 
 154       result = " [exact include][";
 
 159     return super.toString() + result + fFilename+"]";
 
 163    * @see java.lang.Comparable#compareTo(java.lang.Object)
 
 165   public int compareTo(Object o) {
 
 166     PHPIdentifierLocation i = (PHPIdentifierLocation)o;
 
 167     if (fMatch>i.fMatch) {
 
 169     } else if (fMatch<i.fMatch) {
 
 172     return fFilename.compareTo(i.fFilename);
 
 175    * @return Returns the match.
 
 177   public int getMatch() {
 
 181    * @param match The match to set.
 
 183   public void setMatch(int match) {