@Override public final boolean visit(TypeParameter parameter) { ITypeBinding binding= parameter.resolveBinding(); if (binding != null) { // don't collect type parameters declared inside the anonymous fBindings.put(binding.getKey(), binding); } return false; }
@Override public final boolean visit(TypeParameter parameter) { ITypeBinding binding= parameter.resolveBinding(); if (binding != null) { // don't collect type parameters declared inside the anonymous fBindings.put(binding.getKey(), binding); } return false; }
/** * Creates a new generic reference finder. * * @param declaration * the method declaration */ public GenericReferenceFinder(final MethodDeclaration declaration) { Assert.isNotNull(declaration); ITypeBinding binding= null; TypeParameter parameter= null; for (final Iterator<TypeParameter> iterator= declaration.typeParameters().iterator(); iterator.hasNext();) { parameter= iterator.next(); binding= parameter.resolveBinding(); if (binding != null) fBindings.add(binding.getKey()); } }
/** * Creates a new generic reference finder. * * @param declaration * the method declaration */ public GenericReferenceFinder(final MethodDeclaration declaration) { Assert.isNotNull(declaration); ITypeBinding binding= null; TypeParameter parameter= null; for (final Iterator<TypeParameter> iterator= declaration.typeParameters().iterator(); iterator.hasNext();) { parameter= iterator.next(); binding= parameter.resolveBinding(); if (binding != null) fBindings.add(binding.getKey()); } }
/** * Creates a new generic reference finder. * * @param declaration * the method declaration */ public GenericReferenceFinder(final MethodDeclaration declaration) { Assert.isNotNull(declaration); ITypeBinding binding= null; TypeParameter parameter= null; for (final Iterator iterator= declaration.typeParameters().iterator(); iterator.hasNext();) { parameter= (TypeParameter) iterator.next(); binding= parameter.resolveBinding(); if (binding != null) fBindings.add(binding.getKey()); } }
@Override public boolean visit(TypeParameter node) { if (found(node, node.getName()) && this.resolveBinding) this.foundBinding = node.resolveBinding(); return true; }
static ITypeBinding resolveBinding(TypeParameter type) { ITypeBinding binding= type.resolveBinding(); if (binding == null || binding.isRecovered()) throw new MissingBindingException(type); return binding; }
public boolean visit(TypeParameter node) { if (found(node, node.getName()) && this.resolveBinding) this.foundBinding = node.resolveBinding(); return true; }
public boolean visit(TypeParameter node) { if (found(node, node.getName()) && this.resolveBinding) this.foundBinding = node.resolveBinding(); return true; }
public boolean visit(TypeParameter node) { if (found(node, node.getName()) && this.resolveBinding) this.foundBinding = node.resolveBinding(); return true; }
static ITypeBinding resolveBinding(TypeParameter type) { ITypeBinding binding= type.resolveBinding(); if (binding == null || binding.isRecovered()) throw new MissingBindingException(type); return binding; }
public boolean visit(TypeParameter node) { if (found(node, node.getName()) && this.resolveBinding) this.foundBinding = node.resolveBinding(); return true; }
public boolean visit(TypeParameter node) { if (found(node, node.getName()) && this.resolveBinding) this.foundBinding = node.resolveBinding(); return true; }
public boolean visit(TypeParameter node) { if (found(node, node.getName()) && this.resolveBinding) this.foundBinding = node.resolveBinding(); return true; }
private static void addTypeParameters(final CompilationUnit unit, final IType type, final Map<String, ITypeBinding> map) throws JavaModelException { Assert.isNotNull(unit); Assert.isNotNull(type); Assert.isNotNull(map); final AbstractTypeDeclaration declaration= ASTNodeSearchUtil.getAbstractTypeDeclarationNode(type, unit); if (declaration instanceof TypeDeclaration) { ITypeBinding binding= null; TypeParameter parameter= null; for (final Iterator<TypeParameter> iterator= ((TypeDeclaration) declaration).typeParameters().iterator(); iterator.hasNext();) { parameter= iterator.next(); binding= parameter.resolveBinding(); if (binding != null && !map.containsKey(binding.getKey())) map.put(binding.getKey(), binding); } final IType declaring= type.getDeclaringType(); if (declaring != null && !JdtFlags.isStatic(type)) addTypeParameters(unit, declaring, map); } }
private static void addTypeParameters(final CompilationUnit unit, final IType type, final Map<String, ITypeBinding> map) throws JavaModelException { Assert.isNotNull(unit); Assert.isNotNull(type); Assert.isNotNull(map); final AbstractTypeDeclaration declaration= ASTNodeSearchUtil.getAbstractTypeDeclarationNode(type, unit); if (declaration instanceof TypeDeclaration) { ITypeBinding binding= null; TypeParameter parameter= null; for (final Iterator<TypeParameter> iterator= ((TypeDeclaration) declaration).typeParameters().iterator(); iterator.hasNext();) { parameter= iterator.next(); binding= parameter.resolveBinding(); if (binding != null && !map.containsKey(binding.getKey())) map.put(binding.getKey(), binding); } final IType declaring= type.getDeclaringType(); if (declaring != null && !JdtFlags.isStatic(type)) addTypeParameters(unit, declaring, map); } }
private static void addTypeParameters(final CompilationUnit unit, final IType type, final Map map) throws JavaModelException { Assert.isNotNull(unit); Assert.isNotNull(type); Assert.isNotNull(map); final AbstractTypeDeclaration declaration= ASTNodeSearchUtil.getAbstractTypeDeclarationNode(type, unit); if (declaration instanceof TypeDeclaration) { ITypeBinding binding= null; TypeParameter parameter= null; for (final Iterator iterator= ((TypeDeclaration) declaration).typeParameters().iterator(); iterator.hasNext();) { parameter= (TypeParameter) iterator.next(); binding= parameter.resolveBinding(); if (binding != null && !map.containsKey(binding.getKey())) map.put(binding.getKey(), binding); } final IType declaring= type.getDeclaringType(); if (declaring != null && !Flags.isStatic(type.getFlags())) addTypeParameters(unit, declaring, map); } }
private CSTypeParameter mapTypeParameter(TypeParameter item) { CSTypeParameter tp = new CSTypeParameter(identifier(item.getName())); ITypeBinding tb = item.resolveBinding (); if (tb != null) { ITypeBinding superc = mapTypeParameterExtendedType (tb); if (superc != null) tp.superClass(mappedTypeReference(superc)); } return tp; }
recordName(simpleName, typeParameter); recordNodes(typeParameter2, typeParameter); typeParameter2.resolveBinding();
recordName(simpleName, typeParameter); recordNodes(typeParameter2, typeParameter); typeParameter2.resolveBinding();