~ubuntu-branches/ubuntu/wily/aspectj/wily-proposed

« back to all changes in this revision

Viewing changes to org.aspectj/modules/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/BindingTypePattern.java

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2011-03-15 23:54:31 UTC
  • mfrom: (1.2.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20110315235431-iq2gxbsx08kpwuiw
* New upstream release.
* Updated Standards-Version to 3.9.1 (no changes needed).
* Fix local Javadoc links:
  - d/patches/07_javadoc_links.diff: Use locally installed
   javadoc packages and hyperlink with them.
  - d/control: Add B-D on default-java-doc and libasm3-java-doc.
* d/control: Drop B-D on itself (our new bootstrap infrastructure doesn't need
  that anymore).
* Split packages into :
  - aspectj: only contains CLI tools.
  - libaspectj-java: JAR librairies for /usr/share/java.
  - libaspectj-java-doc: 4 API's Javadoc.
  - aspectj-doc: Programming Guides and SDK Documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/********************************************************************
 
2
 * Copyright (c) 2010 Contributors. All rights reserved. 
 
3
 * This program and the accompanying materials are made available 
 
4
 * under the terms of the Eclipse Public License v1.0 
 
5
 * which accompanies this distribution and is available at 
 
6
 * http://eclipse.org/legal/epl-v10.html 
 
7
 *  
 
8
 * Contributors: Nieraj Singh - initial implementation
 
9
 *******************************************************************/
 
10
package org.aspectj.org.eclipse.jdt.core.dom;
 
11
 
 
12
import java.util.List;
 
13
 
 
14
public class BindingTypePattern extends IdentifierTypePattern {
 
15
 
 
16
        private FormalBinding formalBinding;
 
17
 
 
18
        public BindingTypePattern(AST ast, FormalBinding formalBinding) {
 
19
                super(ast, null);
 
20
                this.formalBinding = formalBinding;
 
21
                setTypePatternExpression(generateTypePatternExpression(this.formalBinding));
 
22
        }
 
23
 
 
24
        List<?> internalStructuralPropertiesForType(int apiLevel) {
 
25
                return null;
 
26
        }
 
27
 
 
28
        public FormalBinding getFormalBinding() {
 
29
                return formalBinding;
 
30
        }
 
31
 
 
32
        ASTNode clone0(AST target) {
 
33
                ASTNode node = new BindingTypePattern(target,
 
34
                                (FormalBinding) getFormalBinding().clone(target));
 
35
                node.setSourceRange(getStartPosition(), getLength());
 
36
                return node;
 
37
        }
 
38
 
 
39
        boolean subtreeMatch0(ASTMatcher matcher, Object other) {
 
40
                if (matcher instanceof AjASTMatcher) {
 
41
                        AjASTMatcher ajmatcher = (AjASTMatcher) matcher;
 
42
                        return ajmatcher.match(this, other);
 
43
                }
 
44
                return false;
 
45
        }
 
46
 
 
47
        void accept0(ASTVisitor visitor) {
 
48
                if (visitor instanceof AjASTVisitor) {
 
49
                        AjASTVisitor ajVisitor = (AjASTVisitor) visitor;
 
50
                        boolean visited = ajVisitor.visit(this);
 
51
 
 
52
                        if (visited) {
 
53
                                ajVisitor.visit(getFormalBinding());
 
54
                        }
 
55
                        ajVisitor.endVisit(this);
 
56
                }
 
57
        }
 
58
 
 
59
        protected String generateTypePatternExpression(FormalBinding formalBinding) {
 
60
                String expression = super.generateTypePatternExpression(formalBinding
 
61
                                .getType());
 
62
                expression += expression + " " + formalBinding.getBinding();
 
63
                return expression;
 
64
        }
 
65
 
 
66
}