}
private void enterAbstractMethod(MethodInfo methodInfo) {
if (this.typeDepth >= 0) {
this.memberName[this.typeDepth] = new String(methodInfo.name);
this.memberNameRange[this.typeDepth] =
new SourceRange(methodInfo.nameSourceStart, methodInfo.nameSourceEnd - methodInfo.nameSourceStart + 1);
this.memberDeclarationStart[this.typeDepth] = methodInfo.declarationStart;
IType currentType = this.types[this.typeDepth];
int currenTypeModifiers = this.typeModifiers[this.typeDepth];
char[][] parameterTypes = methodInfo.parameterTypes;
if (methodInfo.isConstructor && currentType.getDeclaringType() != null && !Flags.isStatic(currenTypeModifiers)) {
IType declaringType = currentType.getDeclaringType();
String declaringTypeName = declaringType.getElementName();
if (declaringTypeName.length() == 0) {
IClassFile classFile = declaringType.getClassFile();
int length = parameterTypes != null ? parameterTypes.length : 0;
char[][] newParameterTypes = new char[length+1][];
declaringTypeName = classFile.getElementName();
declaringTypeName = declaringTypeName.substring(0, declaringTypeName.indexOf('.'));
newParameterTypes[0] = declaringTypeName.toCharArray();
if (length != 0) {
System.arraycopy(parameterTypes, 0, newParameterTypes, 1, length);
}
this.methodParameterTypes[this.typeDepth] = newParameterTypes;
} else {
int length = parameterTypes != null ? parameterTypes.length : 0;
char[][] newParameterTypes = new char[length+1][];
newParameterTypes[0] = declaringTypeName.toCharArray();
if (length != 0) {
System.arraycopy(parameterTypes, 0, newParameterTypes, 1, length);
}
this.methodParameterTypes[this.typeDepth] = newParameterTypes;
}
} else {
this.methodParameterTypes[this.typeDepth] = parameterTypes;
}
this.methodParameterNames[this.typeDepth] = methodInfo.parameterNames;
IMethod method = currentType.getMethod(
this.memberName[this.typeDepth],
convertTypeNamesToSigs(this.methodParameterTypes[this.typeDepth]));
// type parameters
if (methodInfo.typeParameters != null) {
for (int i = 0, length = methodInfo.typeParameters.length; i < length; i++) {
TypeParameterInfo typeParameterInfo = methodInfo.typeParameters[i];
ITypeParameter typeParameter = method.getTypeParameter(new String(typeParameterInfo.name));
setSourceRange(
typeParameter,
new SourceRange(
typeParameterInfo.declarationStart,
typeParameterInfo.declarationEnd - typeParameterInfo.declarationStart + 1),
new SourceRange(
typeParameterInfo.nameSourceStart,
typeParameterInfo.nameSourceEnd - typeParameterInfo.nameSourceStart + 1));
}
}
// parameters infos
if (methodInfo.parameterInfos != null) {
for (int i = 0, length = methodInfo.parameterInfos.length; i < length; i++) {
ParameterInfo parameterInfo = methodInfo.parameterInfos[i];
LocalVariableElementKey key = new LocalVariableElementKey(method, new String(parameterInfo.name));
SourceRange[] allRanges = new SourceRange[] {
new SourceRange(
parameterInfo.declarationStart,
parameterInfo.declarationEnd - parameterInfo.declarationStart + 1),
new SourceRange(
parameterInfo.nameSourceStart,
parameterInfo.nameSourceEnd - parameterInfo.nameSourceStart + 1)
};
this.parametersRanges.put(
key,