| /******************************************************************************* |
| * Copyright (c) 2000, 2007 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.wst.jsdt.core.tests.compiler.parser; |
| |
| public class SourceImport { |
| int declarationSourceStart; |
| int declarationSourceEnd; |
| char[] name; |
| boolean onDemand; |
| char[] source; |
| /** |
| * @param declarationSourceStart int |
| * @param declarationSourceEnd int |
| * @param name char[] |
| * @param onDemand boolean |
| */ |
| public SourceImport( |
| int declarationSourceStart, |
| int declarationSourceEnd, |
| char[] name, |
| boolean onDemand, |
| char[] source) { |
| |
| this.declarationSourceStart = declarationSourceStart; |
| this.declarationSourceEnd = declarationSourceEnd; |
| this.name = name; |
| this.onDemand = onDemand; |
| this.source = source; |
| } |
| /** |
| * |
| * @return java.lang.String |
| */ |
| public String toString() { |
| StringBuffer buffer = new StringBuffer(); |
| buffer |
| .append( |
| source, |
| declarationSourceStart, |
| declarationSourceEnd - declarationSourceStart + 1) |
| .append("\n"); |
| return buffer.toString(); |
| } |
| } |