| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright (c) 2014, the Dart project authors. | |
| 3 * | |
| 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | |
| 5 * in compliance with the License. You may obtain a copy of the License at | |
| 6 * | |
| 7 * http://www.eclipse.org/legal/epl-v10.html | |
| 8 * | |
| 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | |
| 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | |
| 11 * or implied. See the License for the specific language governing permissions a
nd limitations under | |
| 12 * the License. | |
| 13 */ | |
| 14 package com.google.dart.server; | |
| 15 | |
| 16 import com.google.dart.server.generated.types.Element; | |
| 17 | |
| 18 /** | |
| 19 * The interface {@code Occurrences} defines the behavior of objects that repres
ent a set of | |
| 20 * occurrences in a file. | |
| 21 * | |
| 22 * @coverage dart.server | |
| 23 */ | |
| 24 public interface Occurrences { | |
| 25 /** | |
| 26 * An empty array of occurrences. | |
| 27 */ | |
| 28 Occurrences[] EMPTY_ARRAY = new Occurrences[0]; | |
| 29 | |
| 30 /** | |
| 31 * Returns {@code true} if the given offset is contained by one of this occurr
ences ranges. | |
| 32 */ | |
| 33 public boolean contains(int offset); | |
| 34 | |
| 35 /** | |
| 36 * A description of the element represented by this node. | |
| 37 * | |
| 38 * @return the {@link Element} | |
| 39 */ | |
| 40 public Element getElement(); | |
| 41 | |
| 42 /** | |
| 43 * Return the length of the referenced element. | |
| 44 * | |
| 45 * @return the length of the referenced element | |
| 46 */ | |
| 47 public int getLength(); | |
| 48 | |
| 49 /** | |
| 50 * Return the offsets of the name of the referenced element within the file. | |
| 51 * | |
| 52 * @return the offsets of the name of the referenced element within the file | |
| 53 */ | |
| 54 public int[] getOffsets(); | |
| 55 | |
| 56 } | |
| OLD | NEW |