~ubuntu-branches/ubuntu/trusty/aspectj/trusty

« 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/FormalBinding.java

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2011-03-15 23:54:31 UTC
  • mfrom: (1.1.5 upstream) (7.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110315235431-7d8cs3gvs4tnqx7t
Tags: 1.6.11+dfsg-1
* 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 FormalBinding extends Type {
 
15
 
 
16
        private Type type;
 
17
        private String binding;
 
18
 
 
19
        /**
 
20
         * 
 
21
         * @param type
 
22
         *            must not be null
 
23
         * @param binding
 
24
         *            must not be null
 
25
         * @param ast
 
26
         *            must not be null
 
27
         */
 
28
        public FormalBinding(Type type, String binding, AST ast) {
 
29
                super(ast);
 
30
        }
 
31
 
 
32
        public Type getType() {
 
33
                return type;
 
34
        }
 
35
 
 
36
        public String getBinding() {
 
37
                return binding;
 
38
        }
 
39
 
 
40
        @Override
 
41
        List<?> internalStructuralPropertiesForType(int apiLevel) {
 
42
                return null;
 
43
        }
 
44
 
 
45
        @Override
 
46
        int getNodeType0() {
 
47
                return 0;
 
48
        }
 
49
 
 
50
        @Override
 
51
        boolean subtreeMatch0(ASTMatcher matcher, Object other) {
 
52
                if (matcher instanceof AjASTMatcher) {
 
53
                        return ((AjASTMatcher) matcher).match(this, other);
 
54
                }
 
55
                return false;
 
56
        }
 
57
 
 
58
        @Override
 
59
        ASTNode clone0(AST target) {
 
60
                ASTNode node = new FormalBinding((Type) getType().clone(target),
 
61
                                getBinding(), target);
 
62
                node.setSourceRange(getStartPosition(), getLength());
 
63
                return node;
 
64
        }
 
65
 
 
66
        @Override
 
67
        void accept0(ASTVisitor visitor) {
 
68
                if (visitor instanceof AjASTVisitor) {
 
69
                        boolean visited = ((AjASTVisitor) visitor).visit(this);
 
70
                        if (visited) {
 
71
                                ((AjASTVisitor) visitor).visit(getType());
 
72
                        }
 
73
                        ((AjASTVisitor) visitor).endVisit(this);
 
74
                }
 
75
 
 
76
        }
 
77
 
 
78
        @Override
 
79
        int treeSize() {
 
80
                return getType().treeSize();
 
81
        }
 
82
 
 
83
        @Override
 
84
        int memSize() {
 
85
                return BASE_NODE_SIZE + (3 * 4) + getType().memSize();
 
86
        }
 
87
 
 
88
}