1 /******************************************************************************* 2 * Copyright (c) 2000, 2006 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.jdt.core; 12 13 /** 14 * A source range defines an element's source coordinates relative to 15 * its source buffer. 16 * <p> 17 * This interface is not intended to be implemented by clients. 18 * </p> 19 */ 20 public interface ISourceRange { 21 22 /** 23 * Returns the number of characters of the source code for this element, 24 * relative to the source buffer in which this element is contained. 25 * 26 * @return the number of characters of the source code for this element, 27 * relative to the source buffer in which this element is contained 28 */ 29 int getLength(); 30 /** 31 * Returns the 0-based index of the first character of the source code for this element, 32 * relative to the source buffer in which this element is contained. 33 * 34 * @return the 0-based index of the first character of the source code for this element, 35 * relative to the source buffer in which this element is contained 36 */ 37 int getOffset(); 38 } 39