diff options
Diffstat (limited to 'org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeDeclarationPattern.java')
-rw-r--r-- | org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeDeclarationPattern.java | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeDeclarationPattern.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeDeclarationPattern.java index e73e979522..a77c57c0ec 100644 --- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeDeclarationPattern.java +++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeDeclarationPattern.java @@ -23,12 +23,12 @@ public char[] simpleName; public char[] pkg; public char[][] enclosingTypeNames; -// set to CLASS_SUFFIX for only matching classes +// set to CLASS_SUFFIX for only matching classes // set to INTERFACE_SUFFIX for only matching interfaces // set to ENUM_SUFFIX for only matching enums // set to ANNOTATION_TYPE_SUFFIX for only matching annotation types // set to TYPE_SUFFIX for matching both classes and interfaces -public char typeSuffix; +public char typeSuffix; public int modifiers; public boolean secondary = false; @@ -52,25 +52,25 @@ PackageNameSet(int size) { } char[] add(char[] name) { - int length = names.length; + int length = this.names.length; int index = CharOperation.hashCode(name) % length; char[] current; - while ((current = names[index]) != null) { + while ((current = this.names[index]) != null) { if (CharOperation.equals(current, name)) return current; if (++index == length) index = 0; } - names[index] = name; + this.names[index] = name; // assumes the threshold is never equal to the size of the table - if (++elementSize > threshold) rehash(); + if (++this.elementSize > this.threshold) rehash(); return name; } void rehash() { - PackageNameSet newSet = new PackageNameSet(elementSize * 2); // double the number of expected elements + PackageNameSet newSet = new PackageNameSet(this.elementSize * 2); // double the number of expected elements char[] current; - for (int i = names.length; --i >= 0;) - if ((current = names[i]) != null) + for (int i = this.names.length; --i >= 0;) + if ((current = this.names[i]) != null) newSet.add(current); this.names = newSet.names; @@ -227,9 +227,9 @@ public char[][] getIndexCategories() { } public boolean matchesDecodedKey(SearchPattern decodedPattern) { TypeDeclarationPattern pattern = (TypeDeclarationPattern) decodedPattern; - + // check type suffix - if (this.typeSuffix != pattern.typeSuffix && typeSuffix != TYPE_SUFFIX) { + if (this.typeSuffix != pattern.typeSuffix && this.typeSuffix != TYPE_SUFFIX) { if (!matchDifferentTypeSuffixes(this.typeSuffix, pattern.typeSuffix)) { return false; } @@ -336,23 +336,23 @@ protected StringBuffer print(StringBuffer output) { output.append("TypeDeclarationPattern: pkg<"); //$NON-NLS-1$ break; } - if (pkg != null) - output.append(pkg); + if (this.pkg != null) + output.append(this.pkg); else output.append("*"); //$NON-NLS-1$ output.append(">, enclosing<"); //$NON-NLS-1$ - if (enclosingTypeNames != null) { - for (int i = 0; i < enclosingTypeNames.length; i++){ - output.append(enclosingTypeNames[i]); - if (i < enclosingTypeNames.length - 1) + if (this.enclosingTypeNames != null) { + for (int i = 0; i < this.enclosingTypeNames.length; i++){ + output.append(this.enclosingTypeNames[i]); + if (i < this.enclosingTypeNames.length - 1) output.append('.'); } } else { output.append("*"); //$NON-NLS-1$ } output.append(">, type<"); //$NON-NLS-1$ - if (simpleName != null) - output.append(simpleName); + if (this.simpleName != null) + output.append(this.simpleName); else output.append("*"); //$NON-NLS-1$ output.append(">"); //$NON-NLS-1$ |