@Override public ITypeBinding[] getTypeArguments() { return originalBinding.getTypeArguments(); }
private static Map<ITypeBinding, ITypeBinding> getGenericToConcreteTypeParamsMap( final IMethodBinding method, final IMethodBinding methodErasure) { return getGenericToConcreteTypeParamsMap(method.getTypeArguments(), methodErasure.getTypeParameters()); }
private void updateMethodTypeVariable(ASTRewrite rewriter, CallContext context) { IMethodBinding method= Invocations.resolveBinding(context.invocation); if (method == null) return; rewriteReferences(rewriter, method.getTypeArguments(), fAnalyzer.getMethodTypeParameterReferences()); }
private void updateMethodTypeVariable(ASTRewrite rewriter, CallContext context) { IMethodBinding method= Invocations.resolveBinding(context.invocation); if (method == null) return; rewriteReferences(rewriter, method.getTypeArguments(), fAnalyzer.getMethodTypeParameterReferences()); }
private void updateMethodTypeVariable(ASTRewrite rewriter, CallContext context) { IMethodBinding method= Invocations.resolveBinding(context.invocation); if (method == null) return; rewriteReferences(rewriter, method.getTypeArguments(), fAnalyzer.getMethodTypeParameterReferences()); }
public static ITypeBinding[] getInferredTypeArguments(Expression invocation) { IMethodBinding methodBinding; switch (invocation.getNodeType()) { case ASTNode.METHOD_INVOCATION: methodBinding= ((MethodInvocation) invocation).resolveMethodBinding(); return methodBinding == null ? null : methodBinding.getTypeArguments(); case ASTNode.SUPER_METHOD_INVOCATION: methodBinding= ((SuperMethodInvocation) invocation).resolveMethodBinding(); return methodBinding == null ? null : methodBinding.getTypeArguments(); case ASTNode.CLASS_INSTANCE_CREATION: Type type= ((ClassInstanceCreation) invocation).getType(); ITypeBinding typeBinding= type.resolveBinding(); return typeBinding == null ? null : typeBinding.getTypeArguments(); default: throw new IllegalArgumentException(invocation.toString()); } } }
public static ITypeBinding[] getInferredTypeArguments(Expression invocation) { IMethodBinding methodBinding; switch (invocation.getNodeType()) { case ASTNode.METHOD_INVOCATION: methodBinding= ((MethodInvocation) invocation).resolveMethodBinding(); return methodBinding == null ? null : methodBinding.getTypeArguments(); case ASTNode.SUPER_METHOD_INVOCATION: methodBinding= ((SuperMethodInvocation) invocation).resolveMethodBinding(); return methodBinding == null ? null : methodBinding.getTypeArguments(); case ASTNode.CLASS_INSTANCE_CREATION: Type type= ((ClassInstanceCreation) invocation).getType(); ITypeBinding typeBinding= type.resolveBinding(); return typeBinding == null ? null : typeBinding.getTypeArguments(); default: throw new IllegalArgumentException(invocation.toString()); } } }
private IConstructor computeMethodTypeSymbol(ISourceLocation decl, IMethodBinding binding, boolean isDeclaration) { IList parameters = computeTypes(isDeclaration ? binding.getParameterTypes() : binding.getTypeArguments(), false); if (binding.isConstructor()) { return constructorSymbol(decl, parameters); } else { IList typeParameters = computeTypes(isDeclaration ? binding.getTypeParameters() : binding.getTypeArguments(), isDeclaration); IConstructor retSymbol = resolveType(binding.getReturnType(), false); return methodSymbol(decl, typeParameters, retSymbol, parameters); } }
private String getMethodName(IMethodBinding binding) { String argumentList = ""; ITypeBinding[] args = binding.getParameterTypes(); for(ITypeBinding arg : args) { argumentList += arg.getName(); } String method = binding.getDeclaringClass().getQualifiedName() + "." + binding.getName() + "/" + binding.getTypeArguments().length + "[" + argumentList + "]"; return method; }
if ((flags & JavaElementLabels.M_APP_TYPE_PARAMETERS) != 0) { if (binding.isParameterizedMethod()) { ITypeBinding[] typeArguments= binding.getTypeArguments(); if (typeArguments.length > 0) { buffer.append(' ');
if ((flags & JavaElementLabels.M_APP_TYPE_PARAMETERS) != 0) { if (binding.isParameterizedMethod()) { ITypeBinding[] typeArguments= binding.getTypeArguments(); if (typeArguments.length > 0) { buffer.append(' ');
if ((flags & JavaElementLabels.M_APP_TYPE_PARAMETERS) != 0) { if (binding.isParameterizedMethod()) { ITypeBinding[] typeArguments= binding.getTypeArguments(); if (typeArguments.length > 0) { buffer.append(' ');
if ((flags & JavaElementLabelsCore.M_APP_TYPE_PARAMETERS) != 0) { if (binding.isParameterizedMethod()) { ITypeBinding[] typeArguments= binding.getTypeArguments(); if (typeArguments.length > 0) { buffer.append(' ');
private void addExplicitTypeArgumentsIfNecessary(Expression invocation) { if (Invocations.isResolvedTypeInferredFromExpectedType(invocation)) { ASTNode referenceContext= fNewLocation.getParent(); if (! (referenceContext instanceof VariableDeclarationFragment || referenceContext instanceof SingleVariableDeclaration || referenceContext instanceof Assignment)) { IMethodBinding methodBinding= Invocations.resolveBinding(invocation); ITypeBinding[] typeArguments= methodBinding.getTypeArguments(); ListRewrite typeArgsRewrite= fInitializerRewrite.getListRewrite(invocation, Invocations.getTypeArgumentsProperty(invocation)); for (int i= 0; i < typeArguments.length; i++) { Type typeArgument= fNewLocationCuRewrite.getImportRewrite().addImport(typeArguments[i], fNewLocationCuRewrite.getAST()); fNewLocationCuRewrite.getImportRemover().registerAddedImports(typeArgument); typeArgsRewrite.insertLast(typeArgument, null); } } } }
|| referenceContext instanceof Assignment)) { IMethodBinding methodBinding= Invocations.resolveBinding(initializer); ITypeBinding[] typeArguments= methodBinding.getTypeArguments(); Type[] typeArgumentNodes= new Type[typeArguments.length]; for (int i= 0; i < typeArguments.length; i++) {
appendTypeArgumentsBindingLabel(method.getTypeArguments(), null, flags); int offset= fBuffer.length(); if (method.isParameterizedMethod()) { appendTypeArgumentsBindingLabel(method.getTypeArguments(), String.valueOf(' '), flags); } else { appendTypeArgumentsBindingLabel(method.getTypeParameters(), String.valueOf(' '), flags|TP_BOUNDS);
appendTypeArgumentsBindingLabel(method.getTypeArguments(), null, flags); int offset= fBuffer.length(); if (method.isParameterizedMethod()) { appendTypeArgumentsBindingLabel(method.getTypeArguments(), String.valueOf(' '), flags); } else { appendTypeArgumentsBindingLabel(method.getTypeParameters(), String.valueOf(' '), flags|TP_BOUNDS);