~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/HasMemberTypePattern.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
/**
 
15
 *
 
16
 */
 
17
public class HasMemberTypePattern extends TypePattern {
 
18
 
 
19
        private SignaturePattern signaturePattern;
 
20
 
 
21
        public HasMemberTypePattern(AST ast, SignaturePattern signaturePattern) {
 
22
                super(ast, signaturePattern.getDetail());
 
23
                this.signaturePattern = signaturePattern;
 
24
        }
 
25
 
 
26
        List<?> internalStructuralPropertiesForType(int apiLevel) {
 
27
                return null;
 
28
        }
 
29
 
 
30
        public SignaturePattern getSignaturePattern() {
 
31
                return signaturePattern;
 
32
        }
 
33
 
 
34
        ASTNode clone0(AST target) {
 
35
                ASTNode cloned = new HasMemberTypePattern(target,
 
36
                                (SignaturePattern) getSignaturePattern().clone(target));
 
37
                cloned.setSourceRange(getStartPosition(), getLength());
 
38
                return cloned;
 
39
        }
 
40
 
 
41
        void accept0(ASTVisitor visitor) {
 
42
                if (visitor instanceof AjASTVisitor) {
 
43
                        AjASTVisitor ajVisitor = (AjASTVisitor) visitor;
 
44
                        boolean visited = ajVisitor.visit(this);
 
45
                        if (visited) {
 
46
                                ajVisitor.visit(getSignaturePattern());
 
47
                        }
 
48
                        ajVisitor.endVisit(this);
 
49
                }
 
50
        }
 
51
 
 
52
        boolean subtreeMatch0(ASTMatcher matcher, Object other) {
 
53
                if (matcher instanceof AjASTMatcher) {
 
54
                        AjASTMatcher ajmatcher = (AjASTMatcher) matcher;
 
55
                        return ajmatcher.match(this, other);
 
56
                }
 
57
                return false;
 
58
        }
 
59
 
 
60
        int memSize() {
 
61
                return super.memSize() + getSignaturePattern().memSize();
 
62
        }
 
63
 
 
64
}