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
8
* Contributors: Nieraj Singh - initial implementation
9
*******************************************************************/
10
package org.aspectj.org.eclipse.jdt.core.dom;
12
import java.util.List;
17
public class HasMemberTypePattern extends TypePattern {
19
private SignaturePattern signaturePattern;
21
public HasMemberTypePattern(AST ast, SignaturePattern signaturePattern) {
22
super(ast, signaturePattern.getDetail());
23
this.signaturePattern = signaturePattern;
26
List<?> internalStructuralPropertiesForType(int apiLevel) {
30
public SignaturePattern getSignaturePattern() {
31
return signaturePattern;
34
ASTNode clone0(AST target) {
35
ASTNode cloned = new HasMemberTypePattern(target,
36
(SignaturePattern) getSignaturePattern().clone(target));
37
cloned.setSourceRange(getStartPosition(), getLength());
41
void accept0(ASTVisitor visitor) {
42
if (visitor instanceof AjASTVisitor) {
43
AjASTVisitor ajVisitor = (AjASTVisitor) visitor;
44
boolean visited = ajVisitor.visit(this);
46
ajVisitor.visit(getSignaturePattern());
48
ajVisitor.endVisit(this);
52
boolean subtreeMatch0(ASTMatcher matcher, Object other) {
53
if (matcher instanceof AjASTMatcher) {
54
AjASTMatcher ajmatcher = (AjASTMatcher) matcher;
55
return ajmatcher.match(this, other);
61
return super.memSize() + getSignaturePattern().memSize();