1 /*******************************************************************************
2 * Copyright (c) 2000, 2008 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
12 package net.sourceforge.phpdt.core.dom;
14 import net.sourceforge.phpdt.core.WorkingCopyOwner;
15 import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope;
16 import net.sourceforge.phpdt.internal.compiler.lookup.CompilationUnitScope;
17 import net.sourceforge.phpdt.internal.compiler.lookup.ElementValuePair;
18 import net.sourceforge.phpdt.internal.compiler.lookup.LookupEnvironment;
21 * A binding resolver is an internal mechanism for figuring out the binding
22 * for a major declaration, type, or name reference. This also handles
23 * the creation and mapping between annotations and the ast nodes that define them.
25 * The default implementation serves as the default binding resolver
26 * that does no resolving whatsoever. Internal subclasses do all the real work.
29 * @see AST#getBindingResolver
31 class BindingResolver {
34 * Creates a binding resolver.
37 // default implementation: do nothing
41 * Finds the corresponding AST node from which the given binding originated.
42 * Returns <code>null</code> if the binding does not correspond to any node
43 * in the compilation unit.
45 * The following table indicates the expected node type for the various
46 * different kinds of bindings:
49 * <li>package - a <code>PackageDeclaration</code></li>
50 * <li>class or interface - a <code>TypeDeclaration</code> or a
51 * <code>ClassInstanceCreation</code> (for anonymous classes) </li>
52 * <li>primitive type - none</li>
53 * <li>array type - none</li>
54 * <li>field - a <code>VariableDeclarationFragment</code> in a
55 * <code>FieldDeclaration</code> </li>
56 * <li>local variable - a <code>SingleVariableDeclaration</code>, or
57 * a <code>VariableDeclarationFragment</code> in a
58 * <code>VariableDeclarationStatement</code> or
59 * <code>VariableDeclarationExpression</code></li>
60 * <li>method - a <code>MethodDeclaration</code> </li>
61 * <li>constructor - a <code>MethodDeclaration</code> </li>
62 * <li>annotation type - an <code>AnnotationTypeDeclaration</code>
63 * <li>annotation type member - an <code>AnnotationTypeMemberDeclaration</code>
67 * The implementation of <code>CompilationUnit.findDeclaringNode</code>
68 * forwards to this method.
71 * The default implementation of this method returns <code>null</code>.
72 * Subclasses may reimplement.
75 * @param binding the binding
76 * @return the corresponding node where the bindings is declared,
77 * or <code>null</code> if none
79 ASTNode findDeclaringNode(IBinding binding) {
84 * Finds the corresponding AST node from which the given binding key originated.
86 * The default implementation of this method returns <code>null</code>.
87 * Subclasses may reimplement.
90 * @param bindingKey the binding key
91 * @return the corresponding node where the bindings is declared,
92 * or <code>null</code> if none
94 ASTNode findDeclaringNode(String bindingKey) {
99 * Finds the corresponding AST node from which the given annotation instance originated.
101 * The default implementation of this method returns <code>null</code>.
102 * Subclasses may reimplement.
105 * @param instance the dom annotation
106 * @return the corresponding node where the bindings is declared,
107 * or <code>null</code> if none
109 ASTNode findDeclaringNode(IAnnotationBinding instance) {
114 * Allows the user to get information about the given old/new pair of
117 * The default implementation of this method does nothing.
118 * Subclasses may reimplement.
121 * @param currentNode the new node
122 * @return org.eclipse.jdt.internal.compiler.ast.ASTNode
124 net.sourceforge.phpdt.internal.compiler.ast.ASTNode getCorrespondingNode(ASTNode currentNode) {
129 * Returns the new method binding corresponding to the given old method binding.
131 * The default implementation of this method returns <code>null</code>.
132 * Subclasses may reimplement.
135 * @param methodBinding the old method binding
136 * @return the new method binding
138 IMethodBinding getMethodBinding(net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding methodBinding) {
143 * Returns the new member value pair binding corresponding to the given old value pair binding.
145 * The default implementation of this method returns <code>null</code>.
146 * Subclasses may reimplement.
149 * @param valuePair the old value pair binding
150 * @return the new member value pair binding
152 IMemberValuePairBinding getMemberValuePairBinding(ElementValuePair valuePair) {
157 * Returns the new package binding corresponding to the given old package binding.
159 * The default implementation of this method returns <code>null</code>.
160 * Subclasses may reimplement.
163 * @param packageBinding the old package binding
164 * @return the new package binding
166 IPackageBinding getPackageBinding(net.sourceforge.phpdt.internal.compiler.lookup.PackageBinding packageBinding) {
171 * Returns the new type binding corresponding to the given old type binding.
173 * The default implementation of this method returns <code>null</code>.
174 * Subclasses may reimplement.
177 * @param referenceBinding the old type binding
178 * @return the new type binding
180 ITypeBinding getTypeBinding(net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding referenceBinding) {
186 * Returns the new type binding corresponding to the given variableDeclaration.
187 * This is used for recovered binding only.
189 * The default implementation of this method returns <code>null</code>.
190 * Subclasses may reimplement.
193 * @param variableDeclaration the given variable declaration
194 * @return the new type binding
196 ITypeBinding getTypeBinding(VariableDeclaration variableDeclaration) {
201 * Returns the new type binding corresponding to the given type. This is used for recovered binding
204 * The default implementation of this method returns <code>null</code>.
205 * Subclasses may reimplement.
208 * @param type the given type
209 * @return the new type binding
211 ITypeBinding getTypeBinding(Type type) {
216 * Returns the new type binding corresponding to the given recovered type binding.
218 * The default implementation of this method returns <code>null</code>.
219 * Subclasses may reimplement.
222 * @param recoveredTypeBinding the recovered type binding
223 * @param dimensions the dimensions to add the to given type binding dimensions
224 * @return the new type binding
226 ITypeBinding getTypeBinding(RecoveredTypeBinding recoveredTypeBinding, int dimensions) {
231 * Returns the new variable binding corresponding to the given old variable binding.
233 * The default implementation of this method returns <code>null</code>.
234 * Subclasses may reimplement.
237 * @param binding the old variable binding
238 * @return the new variable binding
240 IVariableBinding getVariableBinding(net.sourceforge.phpdt.internal.compiler.lookup.VariableBinding binding) {
245 * Return the working copy owner for the receiver.
247 * The default implementation of this method returns <code>null</code>.
248 * Subclasses may reimplement.
250 * @return the working copy owner for the receiver
252 public WorkingCopyOwner getWorkingCopyOwner() {
257 * Return the new annotation corresponding to the given old annotation
259 * The default implementation of this method returns <code>null</code>
260 * Subclasses may reimplement.
263 * @param instance the old annotation
264 * @return the new DOM annotation
266 IAnnotationBinding getAnnotationInstance(net.sourceforge.phpdt.internal.compiler.lookup.AnnotationBinding instance) {
270 boolean isResolvedTypeInferredFromExpectedType(MethodInvocation methodInvocation) {
274 boolean isResolvedTypeInferredFromExpectedType(SuperMethodInvocation methodInvocation) {
279 * Returns the compiler lookup environment used by this binding resolver.
280 * Returns <code>null</code> if none.
282 * @return the lookup environment used by this resolver, or <code>null</code> if none.
284 LookupEnvironment lookupEnvironment() {
289 * This method is used to record the scope and its corresponding node.
291 * The default implementation of this method does nothing.
292 * Subclasses may reimplement.
296 void recordScope(ASTNode astNode, BlockScope blockScope) {
297 // default implementation: do nothing
301 * Returns whether this expression node is the site of a boxing
302 * conversion (JLS3 5.1.7). This information is available only
303 * when bindings are requested when the AST is being built.
305 * @return <code>true</code> if this expression is the site of a
306 * boxing conversion, or <code>false</code> if either no boxing conversion
307 * is involved or if bindings were not requested when the AST was created
310 boolean resolveBoxing(Expression expression) {
315 * Returns whether this expression node is the site of an unboxing
316 * conversion (JLS3 5.1.8). This information is available only
317 * when bindings are requested when the AST is being built.
319 * @return <code>true</code> if this expression is the site of an
320 * unboxing conversion, or <code>false</code> if either no unboxing
321 * conversion is involved or if bindings were not requested when the
325 boolean resolveUnboxing(Expression expression) {
330 * Resolves and returns the compile-time constant expression value as
331 * specified in JLS2 15.28, if this expression has one. Constant expression
332 * values are unavailable unless bindings are requested when the AST is
333 * being built. If the type of the value is a primitive type, the result
334 * is the boxed equivalent (i.e., int returned as an <code>Integer</code>);
335 * if the type of the value is <code>String</code>, the result is the string
336 * itself. If the expression does not have a compile-time constant expression
337 * value, the result is <code>null</code>.
339 * Resolving constant expressions takes into account the value of simple
340 * and qualified names that refer to constant variables (JLS2 4.12.4).
343 * Note 1: enum constants are not considered constant expressions either.
344 * The result is always <code>null</code> for these.
347 * Note 2: Compile-time constant expressions cannot denote <code>null</code>.
348 * So technically {@link NullLiteral} nodes are not constant expressions.
349 * The result is <code>null</code> for these nonetheless.
352 * @return the constant expression value, or <code>null</code> if this
353 * expression has no constant expression value or if bindings were not
354 * requested when the AST was created
357 Object resolveConstantExpressionValue(Expression expression) {
362 * Resolves and returns the binding for the constructor being invoked.
364 * The implementation of
365 * <code>ClassInstanceCreation.resolveConstructor</code>
366 * forwards to this method. Which constructor is invoked is often a function
367 * of the context in which the expression node is embedded as well as
368 * the expression subtree itself.
371 * The default implementation of this method returns <code>null</code>.
372 * Subclasses may reimplement.
375 * @param expression the expression of interest
376 * @return the binding for the constructor being invoked, or
377 * <code>null</code> if no binding is available
379 IMethodBinding resolveConstructor(ClassInstanceCreation expression) {
384 * Resolves and returns the binding for the constructor being invoked.
386 * The implementation of
387 * <code>ConstructorInvocation.resolveConstructor</code>
388 * forwards to this method. Which constructor is invoked is often a function
389 * of the context in which the expression node is embedded as well as
390 * the expression subtree itself.
393 * The default implementation of this method returns <code>null</code>.
394 * Subclasses may reimplement.
397 * @param expression the expression of interest
398 * @return the binding for the constructor being invoked, or
399 * <code>null</code> if no binding is available
401 IMethodBinding resolveConstructor(ConstructorInvocation expression) {
405 * Resolves and returns the binding for the constructor being invoked.
407 * The implementation of
408 * <code>ConstructorInvocation.resolveConstructor</code>
409 * forwards to this method. Which constructor is invoked is often a function
410 * of the context in which the expression node is embedded as well as
411 * the expression subtree itself.
414 * The default implementation of this method returns <code>null</code>.
415 * Subclasses may reimplement.
418 * @param enumConstantDeclaration the enum constant declaration of interest
419 * @return the binding for the constructor being invoked, or
420 * <code>null</code> if no binding is available
422 IMethodBinding resolveConstructor(EnumConstantDeclaration enumConstantDeclaration) {
426 * Resolves and returns the binding for the constructor being invoked.
428 * The implementation of
429 * <code>SuperConstructorInvocation.resolveConstructor</code>
430 * forwards to this method. Which constructor is invoked is often a function
431 * of the context in which the expression node is embedded as well as
432 * the expression subtree itself.
435 * The default implementation of this method returns <code>null</code>.
436 * Subclasses may reimplement.
439 * @param expression the expression of interest
440 * @return the binding for the constructor being invoked, or
441 * <code>null</code> if no binding is available
443 IMethodBinding resolveConstructor(SuperConstructorInvocation expression) {
447 * Resolves the type of the given expression and returns the type binding
450 * The implementation of <code>Expression.resolveTypeBinding</code>
451 * forwards to this method. The result is often a function of the context
452 * in which the expression node is embedded as well as the expression
456 * The default implementation of this method returns <code>null</code>.
457 * Subclasses may reimplement.
460 * @param expression the expression whose type is of interest
461 * @return the binding for the type of the given expression, or
462 * <code>null</code> if no binding is available
464 ITypeBinding resolveExpressionType(Expression expression) {
469 * Resolves the given field access and returns the binding for it.
471 * The implementation of <code>FieldAccess.resolveFieldBinding</code>
472 * forwards to this method. How the field resolves is often a function of
473 * the context in which the field access node is embedded as well as
474 * the field access subtree itself.
477 * The default implementation of this method returns <code>null</code>.
478 * Subclasses may reimplement.
481 * @param fieldAccess the field access of interest
482 * @return the binding for the given field access, or
483 * <code>null</code> if no binding is available
485 IVariableBinding resolveField(FieldAccess fieldAccess) {
490 * Resolves the given super field access and returns the binding for it.
492 * The implementation of <code>SuperFieldAccess.resolveFieldBinding</code>
493 * forwards to this method. How the field resolves is often a function of
494 * the context in which the super field access node is embedded as well as
495 * the super field access subtree itself.
498 * The default implementation of this method returns <code>null</code>.
499 * Subclasses may reimplement.
502 * @param fieldAccess the super field access of interest
503 * @return the binding for the given field access, or
504 * <code>null</code> if no binding is available
506 IVariableBinding resolveField(SuperFieldAccess fieldAccess) {
511 * Resolves the given import declaration and returns the binding for it.
513 * The implementation of <code>ImportDeclaration.resolveBinding</code>
514 * forwards to this method.
517 * The default implementation of this method returns <code>null</code>.
518 * Subclasses may reimplement.
521 * @param importDeclaration the import declaration of interest
522 * @return the binding for the given package declaration, or
523 * the package binding (for on-demand imports) or type binding
524 * (for single-type imports), or <code>null</code> if no binding is
527 IBinding resolveImport(ImportDeclaration importDeclaration) {
532 * Resolves the given annotation type declaration and returns the binding
535 * The implementation of <code>AnnotationTypeMemberDeclaration.resolveBinding</code>
536 * forwards to this method. How the declaration resolves is often a
537 * function of the context in which the declaration node is embedded as well
538 * as the declaration subtree itself.
541 * The default implementation of this method returns <code>null</code>.
542 * Subclasses may reimplement.
545 * @param member the annotation type member declaration of interest
546 * @return the binding for the given annotation type member declaration, or <code>null</code>
547 * if no binding is available
550 IMethodBinding resolveMember(AnnotationTypeMemberDeclaration member) {
555 * Resolves the given method declaration and returns the binding for it.
557 * The implementation of <code>MethodDeclaration.resolveBinding</code>
558 * forwards to this method. How the method resolves is often a function of
559 * the context in which the method declaration node is embedded as well as
560 * the method declaration subtree itself.
563 * The default implementation of this method returns <code>null</code>.
564 * Subclasses may reimplement.
567 * @param method the method or constructor declaration of interest
568 * @return the binding for the given method declaration, or
569 * <code>null</code> if no binding is available
571 IMethodBinding resolveMethod(MethodDeclaration method) {
576 * Resolves the given method invocation and returns the binding for it.
578 * The implementation of <code>MethodInvocation.resolveMethodBinding</code>
579 * forwards to this method. How the method resolves is often a function of
580 * the context in which the method invocation node is embedded as well as
581 * the method invocation subtree itself.
584 * The default implementation of this method returns <code>null</code>.
585 * Subclasses may reimplement.
588 * @param method the method invocation of interest
589 * @return the binding for the given method invocation, or
590 * <code>null</code> if no binding is available
592 IMethodBinding resolveMethod(MethodInvocation method) {
597 * Resolves the given method invocation and returns the binding for it.
599 * The implementation of <code>MethodInvocation.resolveMethodBinding</code>
600 * forwards to this method. How the method resolves is often a function of
601 * the context in which the method invocation node is embedded as well as
602 * the method invocation subtree itself.
605 * The default implementation of this method returns <code>null</code>.
606 * Subclasses may reimplement.
609 * @param method the method invocation of interest
610 * @return the binding for the given method invocation, or
611 * <code>null</code> if no binding is available
613 IMethodBinding resolveMethod(SuperMethodInvocation method) {
618 * Resolves the given name and returns the type binding for it.
620 * The implementation of <code>Name.resolveBinding</code> forwards to
621 * this method. How the name resolves is often a function of the context
622 * in which the name node is embedded as well as the name itself.
625 * The default implementation of this method returns <code>null</code>.
626 * Subclasses may reimplement.
629 * @param name the name of interest
630 * @return the binding for the name, or <code>null</code> if no binding is
633 IBinding resolveName(Name name) {
638 * Resolves the given package declaration and returns the binding for it.
640 * The implementation of <code>PackageDeclaration.resolveBinding</code>
641 * forwards to this method.
644 * The default implementation of this method returns <code>null</code>.
645 * Subclasses may reimplement.
648 * @param pkg the package declaration of interest
649 * @return the binding for the given package declaration, or
650 * <code>null</code> if no binding is available
652 IPackageBinding resolvePackage(PackageDeclaration pkg) {
657 * Resolves the given reference and returns the binding for it.
659 * The implementation of <code>MemberRef.resolveBinding</code> forwards to
660 * this method. How the name resolves is often a function of the context
661 * in which the name node is embedded as well as the name itself.
664 * The default implementation of this method returns <code>null</code>.
665 * Subclasses may reimplement.
668 * @param ref the reference of interest
669 * @return the binding for the reference, or <code>null</code> if no binding is
673 IBinding resolveReference(MemberRef ref) {
678 * Resolves the given member value pair and returns the binding for it.
680 * The implementation of <code>MemberValuePair.resolveMemberValuePairBinding</code> forwards to
681 * this method. How the name resolves is often a function of the context
682 * in which the name node is embedded as well as the name itself.
685 * The default implementation of this method returns <code>null</code>.
686 * Subclasses may reimplement.
689 * @param memberValuePair the member value pair of interest
690 * @return the binding for the member value pair, or <code>null</code> if no binding is
694 IMemberValuePairBinding resolveMemberValuePair(MemberValuePair memberValuePair) {
699 * Resolves the given reference and returns the binding for it.
701 * The implementation of <code>MethodRef.resolveBinding</code> forwards to
702 * this method. How the name resolves is often a function of the context
703 * in which the name node is embedded as well as the name itself.
706 * The default implementation of this method returns <code>null</code>.
707 * Subclasses may reimplement.
710 * @param ref the reference of interest
711 * @return the binding for the reference, or <code>null</code> if no binding is
715 IBinding resolveReference(MethodRef ref) {
720 * Resolves the given annotation type declaration and returns the binding
723 * The implementation of <code>AnnotationTypeDeclaration.resolveBinding</code>
724 * forwards to this method. How the declaration resolves is often a
725 * function of the context in which the declaration node is embedded as well
726 * as the declaration subtree itself.
729 * The default implementation of this method returns <code>null</code>.
730 * Subclasses may reimplement.
733 * @param type the annotation type declaration of interest
734 * @return the binding for the given annotation type declaration, or <code>null</code>
735 * if no binding is available
738 ITypeBinding resolveType(AnnotationTypeDeclaration type) {
743 * Resolves the given anonymous class declaration and returns the binding
746 * The implementation of <code>AnonymousClassDeclaration.resolveBinding</code>
747 * forwards to this method. How the declaration resolves is often a
748 * function of the context in which the declaration node is embedded as well
749 * as the declaration subtree itself.
752 * The default implementation of this method returns <code>null</code>.
753 * Subclasses may reimplement.
756 * @param type the anonymous class declaration of interest
757 * @return the binding for the given class declaration, or <code>null</code>
758 * if no binding is available
760 ITypeBinding resolveType(AnonymousClassDeclaration type) {
765 * Resolves the given enum declaration and returns the binding
768 * The implementation of <code>EnumDeclaration.resolveBinding</code>
769 * forwards to this method. How the enum declaration resolves is often
770 * a function of the context in which the declaration node is embedded
771 * as well as the enum declaration subtree itself.
774 * The default implementation of this method returns <code>null</code>.
775 * Subclasses may reimplement.
778 * @param type the enum declaration of interest
779 * @return the binding for the given enum declaration, or <code>null</code>
780 * if no binding is available
783 ITypeBinding resolveType(EnumDeclaration type) {
788 * Resolves the given type and returns the type binding for it.
790 * The implementation of <code>Type.resolveBinding</code>
791 * forwards to this method. How the type resolves is often a function
792 * of the context in which the type node is embedded as well as the type
796 * The default implementation of this method returns <code>null</code>.
797 * Subclasses may reimplement.
800 * @param type the type of interest
801 * @return the binding for the given type, or <code>null</code>
802 * if no binding is available
804 ITypeBinding resolveType(Type type) {
809 * Resolves the given class or interface declaration and returns the binding
812 * The implementation of <code>TypeDeclaration.resolveBinding</code>
813 * (and <code>TypeDeclarationStatement.resolveBinding</code>) forwards
814 * to this method. How the type declaration resolves is often a function of
815 * the context in which the type declaration node is embedded as well as the
816 * type declaration subtree itself.
819 * The default implementation of this method returns <code>null</code>.
820 * Subclasses may reimplement.
823 * @param type the class or interface declaration of interest
824 * @return the binding for the given type declaration, or <code>null</code>
825 * if no binding is available
827 ITypeBinding resolveType(TypeDeclaration type) {
832 * Resolves the given type parameter and returns the type binding for the
835 * The implementation of <code>TypeParameter.resolveBinding</code>
836 * forwards to this method. How the declaration resolves is often a
837 * function of the context in which the declaration node is embedded as well
838 * as the declaration subtree itself.
841 * The default implementation of this method returns <code>null</code>.
842 * Subclasses may reimplement.
845 * @param typeParameter the type paramter of interest
846 * @return the binding for the given type parameter, or <code>null</code>
847 * if no binding is available
850 ITypeBinding resolveTypeParameter(TypeParameter typeParameter) {
855 * Resolves the given enum constant declaration and returns the binding for
858 * The implementation of <code>EnumConstantDeclaration.resolveVariable</code>
859 * forwards to this method.
862 * The default implementation of this method returns <code>null</code>.
863 * Subclasses may reimplement.
866 * @param enumConstant the enum constant declaration of interest
867 * @return the field binding for the given enum constant declaration, or
868 * <code>null</code> if no binding is available
871 IVariableBinding resolveVariable(EnumConstantDeclaration enumConstant) {
876 * Resolves the given variable declaration and returns the binding for it.
878 * The implementation of <code>VariableDeclaration.resolveBinding</code>
879 * forwards to this method. How the variable declaration resolves is often
880 * a function of the context in which the variable declaration node is
881 * embedded as well as the variable declaration subtree itself. VariableDeclaration
882 * declarations used as local variable, formal parameter and exception
883 * variables resolve to local variable bindings; variable declarations
884 * used to declare fields resolve to field bindings.
887 * The default implementation of this method returns <code>null</code>.
888 * Subclasses may reimplement.
891 * @param variable the variable declaration of interest
892 * @return the binding for the given variable declaration, or
893 * <code>null</code> if no binding is available
895 IVariableBinding resolveVariable(VariableDeclaration variable) {
900 * Resolves the given well known type by name and returns the type binding
903 * The implementation of <code>AST.resolveWellKnownType</code>
904 * forwards to this method.
907 * The default implementation of this method returns <code>null</code>.
908 * Subclasses may reimplement.
911 * @param name the name of a well known type
912 * @return the corresponding type binding, or <code>null<code> if the
913 * named type is not considered well known or if no binding can be found
916 ITypeBinding resolveWellKnownType(String name) {
921 * Resolves the given annotation instance and returns the DOM representation for it.
923 * The implementation of {@link Annotation#resolveAnnotationBinding()}
924 * forwards to this method.
927 * The default implementation of this method returns <code>null</code>.
928 * Subclasses may reimplement.
931 * @param annotation the annotation ast node of interest
932 * @return the DOM annotation representation for the given ast node, or
933 * <code>null</code> if none is available
935 IAnnotationBinding resolveAnnotation(Annotation annotation) {
940 * Answer an array type binding with the given type binding and the given
943 * <p>If the given type binding is an array binding, then the resulting dimensions is the given dimensions
944 * plus the existing dimensions of the array binding. Otherwise the resulting dimensions is the given
948 * The default implementation of this method returns <code>null</code>.
949 * Subclasses may reimplement.
952 * @param typeBinding the given type binding
953 * @param dimensions the given dimensions
954 * @return an array type binding with the given type binding and the given
956 * @throws IllegalArgumentException if the type binding represents the <code>void</code> type binding
958 ITypeBinding resolveArrayType(ITypeBinding typeBinding, int dimensions) {
963 * Returns the compilation unit scope used by this binding resolver.
964 * Returns <code>null</code> if none.
966 * @return the compilation unit scope by this resolver, or <code>null</code> if none.
968 public CompilationUnitScope scope() {
973 * Allows the user to store information about the given old/new pair of
976 * The default implementation of this method does nothing.
977 * Subclasses may reimplement.
980 * @param newNode the new AST node
981 * @param oldASTNode the old AST node
983 void store(ASTNode newNode, org.eclipse.jdt.internal.compiler.ast.ASTNode oldASTNode) {
984 // default implementation: do nothing
988 * Allows the user to update information about the given old/new pair of
991 * The default implementation of this method does nothing.
992 * Subclasses may reimplement.
995 * @param node the old AST node
996 * @param newNode the new AST node
998 void updateKey(ASTNode node, ASTNode newNode) {
999 // default implementation: do nothing