int start = methodInfo.getNameSourceStart(); int end = methodInfo.getNameSourceEnd(); char[][] typeParameterNames = methodInfo.getTypeParameterNames(); if (typeParameterNames != null) { int parameterCount = typeParameterNames.length; if (parameterCount > 0) { // method's type parameters must be null if no type parameter char[][][] typeParameterBounds = methodInfo.getTypeParameterBounds(); typeParams = new TypeParameter[parameterCount]; for (int i = 0; i < parameterCount; i++) { int modifiers = methodInfo.getModifiers(); if (methodInfo.isConstructor()) { ConstructorDeclaration decl = new ConstructorDeclaration(compilationResult); decl.bits &= ~ASTNode.IsDefaultConstructor; } else { MethodDeclaration decl; if (methodInfo.isAnnotationMethod()) { AnnotationMethodDeclaration annotationMethodDeclaration = new AnnotationMethodDeclaration(compilationResult); decl.returnType = createTypeReference(methodInfo.getReturnTypeName(), start, end); method.sourceStart = start; method.sourceEnd = end; method.declarationSourceStart = methodInfo.getDeclarationSourceStart(); method.declarationSourceEnd = methodInfo.getDeclarationSourceEnd(); char[][] argumentNames = methodInfo.getArgumentNames();
/** * @private Debugging purposes */ protected void toStringInfo(int tab, StringBuffer buffer, Object info, boolean showResolvedInfo) { buffer.append(tabString(tab)); if (info == null) { toStringName(buffer); buffer.append(" (not open)"); //$NON-NLS-1$ } else if (info == NO_INFO) { toStringName(buffer); } else { SourceMethodElementInfo methodInfo = (SourceMethodElementInfo) info; int flags = methodInfo.getModifiers(); if (Flags.isStatic(flags)) { buffer.append("static "); //$NON-NLS-1$ } if (!methodInfo.isConstructor()) { buffer.append(methodInfo.getReturnTypeName()); buffer.append(' '); } toStringName(buffer, flags); } } protected void toStringName(StringBuffer buffer) {
SourceMethodElementInfo oldSourceMethodInfo = (SourceMethodElementInfo)oldInfo; SourceMethodElementInfo newSourceMethodInfo = (SourceMethodElementInfo)newInfo; if (!CharOperation.equals(oldSourceMethodInfo.getReturnTypeName(), newSourceMethodInfo.getReturnTypeName()) || !CharOperation.equals(oldSourceMethodInfo.getTypeParameterNames(), newSourceMethodInfo.getTypeParameterNames()) || !equals(oldSourceMethodInfo.getTypeParameterBounds(), newSourceMethodInfo.getTypeParameterBounds())) { this.delta.changed(newElement, IJavaElementDelta.F_CONTENT);
SourceMethod sourceMethod = sourceMethods[i]; SourceMethodElementInfo methodInfo = (SourceMethodElementInfo)sourceMethod.getElementInfo(); boolean isConstructor = methodInfo.isConstructor(); if ((methodInfo.getModifiers() & ClassFileConstants.AccAbstract) != 0) { hasAbstractMethods = true;
/** * @see IMethod */ public String getReturnType() throws JavaModelException { SourceMethodElementInfo info = (SourceMethodElementInfo) getElementInfo(); return Signature.createTypeSignature(info.getReturnTypeName(), false); } /**
/** * @see IMethod */ public String[] getParameterNames() throws JavaModelException { SourceMethodElementInfo info = (SourceMethodElementInfo) getElementInfo(); char[][] names= info.getArgumentNames(); return CharOperation.toStrings(names); } /**
/** * @see IMethod */ public String[] getExceptionTypes() throws JavaModelException { SourceMethodElementInfo info = (SourceMethodElementInfo) getElementInfo(); char[][] exs= info.getExceptionTypeNames(); return CompilationUnitStructureRequestor.convertTypeNamesToSigs(exs); } /**
/** * @private Debugging purposes */ protected void toStringInfo(int tab, StringBuffer buffer, Object info, boolean showResolvedInfo) { buffer.append(tabString(tab)); if (info == null) { toStringName(buffer); buffer.append(" (not open)"); //$NON-NLS-1$ } else if (info == NO_INFO) { toStringName(buffer); } else { SourceMethodElementInfo methodInfo = (SourceMethodElementInfo) info; int flags = methodInfo.getModifiers(); if (Flags.isStatic(flags)) { buffer.append("static "); //$NON-NLS-1$ } if (!methodInfo.isConstructor()) { buffer.append(methodInfo.getReturnTypeName()); buffer.append(' '); } toStringName(buffer, flags); } } protected void toStringName(StringBuffer buffer) {
SourceMethodElementInfo oldSourceMethodInfo = (SourceMethodElementInfo)oldInfo; SourceMethodElementInfo newSourceMethodInfo = (SourceMethodElementInfo)newInfo; if (!CharOperation.equals(oldSourceMethodInfo.getReturnTypeName(), newSourceMethodInfo.getReturnTypeName()) || !CharOperation.equals(oldSourceMethodInfo.getTypeParameterNames(), newSourceMethodInfo.getTypeParameterNames()) || !equals(oldSourceMethodInfo.getTypeParameterBounds(), newSourceMethodInfo.getTypeParameterBounds())) { this.delta.changed(newElement, IJavaElementDelta.F_CONTENT);
SourceMethod sourceMethod = sourceMethods[i]; SourceMethodElementInfo methodInfo = (SourceMethodElementInfo)sourceMethod.getElementInfo(); boolean isConstructor = methodInfo.isConstructor(); if ((methodInfo.getModifiers() & ClassFileConstants.AccAbstract) != 0) { hasAbstractMethods = true;
/** * @see IMethod */ @Override public String getReturnType() throws JavaModelException { SourceMethodElementInfo info = (SourceMethodElementInfo) getElementInfo(); return Signature.createTypeSignature(info.getReturnTypeName(), false); } /**
/** * @see IMethod */ @Override public String[] getParameterNames() throws JavaModelException { SourceMethodElementInfo info = (SourceMethodElementInfo) getElementInfo(); char[][] names= info.getArgumentNames(); return CharOperation.toStrings(names); } /**
/** * @see IMethod */ public String[] getExceptionTypes() throws JavaModelException { SourceMethodElementInfo info = (SourceMethodElementInfo) getElementInfo(); char[][] exs= info.getExceptionTypeNames(); return CompilationUnitStructureRequestor.convertTypeNamesToSigs(exs); } /**
int start = methodInfo.getNameSourceStart(); int end = methodInfo.getNameSourceEnd(); char[][] typeParameterNames = methodInfo.getTypeParameterNames(); if (typeParameterNames != null) { int parameterCount = typeParameterNames.length; if (parameterCount > 0) { // method's type parameters must be null if no type parameter char[][][] typeParameterBounds = methodInfo.getTypeParameterBounds(); typeParams = new TypeParameter[parameterCount]; for (int i = 0; i < parameterCount; i++) { int modifiers = methodInfo.getModifiers(); if (methodInfo.isConstructor()) { ConstructorDeclaration decl = new ConstructorDeclaration(compilationResult); decl.bits &= ~ASTNode.IsDefaultConstructor; } else { MethodDeclaration decl; if (methodInfo.isAnnotationMethod()) { AnnotationMethodDeclaration annotationMethodDeclaration = new AnnotationMethodDeclaration(compilationResult); decl.returnType = createTypeReference(methodInfo.getReturnTypeName(), start, end); method.sourceStart = start; method.sourceEnd = end; method.declarationSourceStart = methodInfo.getDeclarationSourceStart(); method.declarationSourceEnd = methodInfo.getDeclarationSourceEnd(); char[][] argumentNames = methodInfo.getArgumentNames();
/** * @private Debugging purposes */ protected void toStringInfo(int tab, StringBuffer buffer, Object info, boolean showResolvedInfo) { buffer.append(tabString(tab)); if (info == null) { toStringName(buffer); buffer.append(" (not open)"); //$NON-NLS-1$ } else if (info == NO_INFO) { toStringName(buffer); } else { SourceMethodElementInfo methodInfo = (SourceMethodElementInfo) info; int flags = methodInfo.getModifiers(); if (Flags.isStatic(flags)) { buffer.append("static "); //$NON-NLS-1$ } if (!methodInfo.isConstructor()) { buffer.append(methodInfo.getReturnTypeName()); buffer.append(' '); } toStringName(buffer, flags); } } protected void toStringName(StringBuffer buffer) {
SourceMethodElementInfo oldSourceMethodInfo = (SourceMethodElementInfo)oldInfo; SourceMethodElementInfo newSourceMethodInfo = (SourceMethodElementInfo)newInfo; if (!CharOperation.equals(oldSourceMethodInfo.getReturnTypeName(), newSourceMethodInfo.getReturnTypeName()) || !CharOperation.equals(oldSourceMethodInfo.getTypeParameterNames(), newSourceMethodInfo.getTypeParameterNames()) || !equals(oldSourceMethodInfo.getTypeParameterBounds(), newSourceMethodInfo.getTypeParameterBounds())) { this.delta.changed(newElement, IJavaElementDelta.F_CONTENT);
SourceMethod sourceMethod = sourceMethods[i]; SourceMethodElementInfo methodInfo = (SourceMethodElementInfo)sourceMethod.getElementInfo(); boolean isConstructor = methodInfo.isConstructor(); if ((methodInfo.getModifiers() & ClassFileConstants.AccAbstract) != 0) { hasAbstractMethods = true;
/** * @see IMethod */ public String getReturnType() throws JavaModelException { SourceMethodElementInfo info = (SourceMethodElementInfo) getElementInfo(); return Signature.createTypeSignature(info.getReturnTypeName(), false); } /**
/** * @see IMethod */ public String[] getParameterNames() throws JavaModelException { SourceMethodElementInfo info = (SourceMethodElementInfo) getElementInfo(); char[][] names= info.getArgumentNames(); return CharOperation.toStrings(names); } /**
/** * @see IMethod */ @Override public String[] getExceptionTypes() throws JavaModelException { SourceMethodElementInfo info = (SourceMethodElementInfo) getElementInfo(); char[][] exs= info.getExceptionTypeNames(); return CompilationUnitStructureRequestor.convertTypeNamesToSigs(exs); } /**