1 package net.sourceforge.phpeclipse.obfuscator;
7 public class PHPIdentifier {
9 public final static int CLASS = 1;
10 public final static int FUNCTION = 2;
11 public final static int METHOD = 4;
12 public final static int VARIABLE = 3;
13 public final static int DEFINE = 5;
14 public final static int CONSTRUCTOR = 6;
15 private String fIdentifier;
19 public PHPIdentifier(String identifier, int type) {
21 fIdentifier = identifier;
25 * @see java.lang.Object#equals(java.lang.Object)
27 public boolean equals(Object obj) {
28 if (!(obj instanceof PHPIdentifier)) {
31 return ((PHPIdentifier) obj).fType == fType && ((PHPIdentifier) obj).fIdentifier.equals(fIdentifier);
34 public String getIdentifier() {
38 public int getType() {
42 public boolean isClass() {
43 return fType == CLASS;
46 public boolean isFunction() {
47 return fType == FUNCTION;
50 public boolean isVariable() {
51 return fType == VARIABLE;
54 public boolean isMethod() {
55 return fType == METHOD;
58 public boolean isDefine() {
59 return fType == DEFINE;
62 public boolean isConstructor() {
63 return fType == CONSTRUCTOR;
66 public void setIdentifier(String fIdentifier) {
67 this.fIdentifier = fIdentifier;
70 public void setType(int fType) {
75 * @see java.lang.Object#toString()
77 public String toString() {
82 return "constructor - ";