Skip to main content
summaryrefslogtreecommitdiffstats
blob: 55472ef1561232cc5ea849b499796ee93ce36042 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*******************************************************************************
 * Copyright (c) 2016 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     
 *******************************************************************************/
package org.eclipse.jdt.internal.compiler.parser;

import org.eclipse.jdt.internal.compiler.ast.ASTNode;
import org.eclipse.jdt.internal.compiler.ast.ModuleReference;

public class RecoveredModuleReference extends RecoveredElement {

	public ModuleReference moduleReference;
public RecoveredModuleReference(ModuleReference moduleReference, RecoveredElement parent, int bracketBalance){
	super(parent, bracketBalance);
	this.moduleReference = moduleReference;
}
/*
 * Answer the associated parsed structure
 */
@Override
public ASTNode parseTree(){
	return this.moduleReference;
}
/*
 * Answer the very source end of the corresponding parse node
 */
@Override
public int sourceEnd(){
	return this.moduleReference.sourceEnd;
}
@Override
public String toString(int tab) {
	return tabString(tab) + "Recovered ModuleReference: " + this.moduleReference.toString(); //$NON-NLS-1$
}
public ModuleReference updatedModuleReference(){

	return this.moduleReference;
}
@Override
public void updateParseTree(){
	updatedModuleReference();
}
/*
 * Update the declarationSourceEnd of the corresponding parse node
 */
//public void updateSourceEndIfNecessary(int bodyStart, int bodyEnd){
//	if (this.moduleReference.declarationSourceEnd == 0) {
//		this.moduleReference.declarationSourceEnd = bodyEnd;
//		this.moduleReference.declarationEnd = bodyEnd;
//	}
//}

}

Back to the top