List of usage examples for org.eclipse.jdt.core.dom IMethodBinding isDeprecated
public boolean isDeprecated();
From source file:edu.brown.cs.bubbles.bedrock.BedrockElider.java
License:Open Source License
private String getMethodType(Name n) { IMethodBinding mb = (IMethodBinding) n.resolveBinding(); if (mb == null) return "U"; String typ = ""; if (mb.isDeprecated()) typ = "D"; if (Modifier.isAbstract(mb.getModifiers())) typ = "A"; else if (Modifier.isStatic(mb.getModifiers())) typ = "S"; return typ;/* w w w. ja v a 2 s.c o m*/ }
From source file:org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.java
License:Open Source License
/** * @since 2.4/*from ww w.j a va 2 s . c o m*/ */ protected void enhanceExecutable(StringBuilder fqn, String handleIdentifier, String[] path, JvmExecutable result, IMethodBinding method) { String name = method.getName(); fqn.append(name); fqn.append('('); ITypeBinding[] parameterTypes = method.getParameterTypes(); for (int i = 0; i < parameterTypes.length; i++) { if (i != 0) fqn.append(','); fqn.append(getQualifiedName(parameterTypes[i])); } fqn.append(')'); result.internalSetIdentifier(fqn.toString()); result.setSimpleName(name); setVisibility(result, method.getModifiers()); result.setDeprecated(method.isDeprecated()); if (parameterTypes.length > 0) { result.setVarArgs(method.isVarargs()); String[] parameterNames = null; // If the method is derived from source, we can efficiently determine the parameter names now. // ITypeBinding declaringClass = method.getDeclaringClass(); if (declaringClass.isFromSource()) { parameterNames = getParameterNamesFromSource(fqn, method); } else { // Use the key to determine the signature for the method. // SegmentSequence signaturex = getSignatureAsSegmentSequence(method); ParameterNameInitializer initializer = jdtCompliance.createParameterNameInitializer(method, workingCopyOwner, result, handleIdentifier, path, name, signaturex); ((JvmExecutableImplCustom) result).setParameterNameInitializer(initializer); } setParameterNamesAndAnnotations(method, parameterTypes, parameterNames, result); } ITypeBinding[] exceptionTypes = method.getExceptionTypes(); if (exceptionTypes.length > 0) { InternalEList<JvmTypeReference> exceptions = (InternalEList<JvmTypeReference>) result.getExceptions(); for (ITypeBinding exceptionType : exceptionTypes) { exceptions.addUnique(createTypeReference(exceptionType)); } } }