Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java')
-rw-r--r--org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java58
1 files changed, 29 insertions, 29 deletions
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java
index 2ef37cd6d..dc7bc9c0f 100644
--- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java
+++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/BinaryIndexer.java
@@ -274,32 +274,32 @@ public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
if (arrayDim > 0)
return convertToArrayType(BYTE, arrayDim);
return BYTE;
-
+
case 'C':
if (arrayDim > 0)
return convertToArrayType(CHAR, arrayDim);
return CHAR;
-
+
case 'D':
if (arrayDim > 0)
return convertToArrayType(DOUBLE, arrayDim);
return DOUBLE;
-
+
case 'F':
if (arrayDim > 0)
return convertToArrayType(FLOAT, arrayDim);
return FLOAT;
-
+
case 'I':
if (arrayDim > 0)
return convertToArrayType(INT, arrayDim);
return INT;
-
+
case 'J':
if (arrayDim > 0)
return convertToArrayType(LONG, arrayDim);
return LONG;
-
+
case 'L':
int indexOfSemiColon = CharOperation.indexOf(';', signature, i+1);
if (indexOfSemiColon == -1) throw new ClassFormatException(ClassFormatException.ErrInvalidMethodSignature);
@@ -307,24 +307,24 @@ public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
return convertToArrayType(replace('/','.',CharOperation.subarray(signature, i + 1, indexOfSemiColon)), arrayDim);
}
return replace('/','.',CharOperation.subarray(signature, i + 1, indexOfSemiColon));
-
+
case 'S':
if (arrayDim > 0)
return convertToArrayType(SHORT, arrayDim);
return SHORT;
-
+
case 'Z':
if (arrayDim > 0)
return convertToArrayType(BOOLEAN, arrayDim);
return BOOLEAN;
-
+
case 'V':
return VOID;
-
+
case '[':
arrayDim++;
break;
-
+
default:
throw new ClassFormatException(ClassFormatException.ErrInvalidMethodSignature);
}
@@ -361,7 +361,7 @@ public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
convertToArrayType(parameterTypes, parameterTypesCounter-1, arrayDim);
arrayDim = 0;
break;
-
+
case 'C':
parameterTypes[parameterTypesCounter++] = CHAR;
if (arrayDim > 0)
@@ -382,14 +382,14 @@ public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
convertToArrayType(parameterTypes, parameterTypesCounter-1, arrayDim);
arrayDim = 0;
break;
-
+
case 'I':
parameterTypes[parameterTypesCounter++] = INT;
if (arrayDim > 0)
convertToArrayType(parameterTypes, parameterTypesCounter-1, arrayDim);
arrayDim = 0;
break;
-
+
case 'J':
parameterTypes[parameterTypesCounter++] = LONG;
if (arrayDim > 0)
@@ -429,7 +429,7 @@ public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
case '[':
arrayDim++;
break;
-
+
default:
throw new ClassFormatException(ClassFormatException.ErrInvalidMethodSignature);
}
@@ -450,12 +450,12 @@ public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
if (arrayDim > 0)
return convertToArrayType(BYTE, arrayDim);
return BYTE;
-
+
case 'C':
if (arrayDim > 0)
return convertToArrayType(CHAR, arrayDim);
return CHAR;
-
+
case 'D':
if (arrayDim > 0)
return convertToArrayType(DOUBLE, arrayDim);
@@ -500,7 +500,7 @@ public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
case '[':
arrayDim++;
break;
-
+
default:
throw new ClassFormatException(ClassFormatException.ErrInvalidMethodSignature);
}
@@ -634,7 +634,7 @@ public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
break; // skip over array references
name = replace('/', '.', name); // so that it looks like java.lang.String
addTypeReference(name);
-
+
// also add a simple reference on each segment of the qualification (see http://bugs.eclipse.org/bugs/show_bug.cgi?id=24741)
char[][] qualification = CharOperation.splitOn('.', name);
for (int j = 0, length = qualification.length; j < length; j++) {
@@ -658,13 +658,13 @@ public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
if (contents == null) return;
final String path = this.document.getPath();
ClassFileReader reader = new ClassFileReader(contents, path == null ? null : path.toCharArray());
-
+
IModule module = reader.getModuleDeclaration();
if (module != null) {
indexModule(module);
return;
}
-
+
// first add type references
char[] className = replace('/', '.', reader.getName()); // looks like java/lang/String
// need to extract the package name and the simple name
@@ -696,7 +696,7 @@ public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
// See PR 1GIR345: ITPJCORE:ALL - Indexer: NegativeArraySizeException
return;
}
- enclosingTypeName = new char[nameLength];
+ enclosingTypeName = new char[nameLength];
System.arraycopy(fullEnclosingName, packageNameIndex + 1, enclosingTypeName, 0, nameLength);
}
}
@@ -707,10 +707,10 @@ public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
CharOperation.replace(genericSignature, '/', '.');
typeParameterSignatures = Signature.getTypeParameters(genericSignature);
}
-
+
// eliminate invalid innerclasses (1G4KCF7)
if (name == null) return;
-
+
char[][] superinterfaces = replace('/', '.', reader.getInterfaceNames());
char[][] enclosingTypeNames = enclosingTypeName == null ? null : new char[][] {enclosingTypeName};
int modifiers = reader.getModifiers();
@@ -746,7 +746,7 @@ public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
addClassDeclaration(modifiers, packageName, name, enclosingTypeNames, superclass, superinterfaces, null, typeParameterSignatures, false);
// SH}
break;
- }
+ }
// Look for references in class annotations
IBinaryAnnotation[] annotations = reader.getAnnotations();
@@ -787,7 +787,7 @@ public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
addConstructorDeclaration(
name,
parameterTypes == null ? 0 : parameterTypes.length,
- signature,
+ signature,
parameterTypes,
method.getArgumentNames(),
method.getModifiers(),
@@ -809,7 +809,7 @@ public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
null,
selector,
parameterTypes == null ? 0 : parameterTypes.length,
- signature,
+ signature,
parameterTypes,
method.getArgumentNames(),
returnType,
@@ -872,7 +872,7 @@ public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
e));
}
}
-
+
private void indexModule(IModule module) {
addModuleDeclaration(module.name());
IModuleReference[] requiredModules = module.requires();
@@ -922,7 +922,7 @@ public class BinaryIndexer extends AbstractIndexer implements SuffixConstants {
return;
addTypeReference(ref);
}
-
+
private char[] removeFirstSyntheticParameter(char[] descriptor) {
if (descriptor == null) return null;
if (descriptor.length < 3) return descriptor;

Back to the top