1 19 20 package org.netbeans.modules.java.source.engine; 21 22 import javax.lang.model.element.Element; 23 import org.netbeans.api.java.source.query.SourceSelection; 24 25 29 public abstract class DefaultSourceSelection implements SourceSelection { 30 private final int start; 31 private final int offset; 32 private final int end; 33 private final String path; 34 private final Element element; 35 36 public DefaultSourceSelection(Element element, int start, 37 int offset, int end, String path) { 38 this.element = element; 39 this.start = start; 40 this.offset = offset; 41 this.end = end; 42 this.path = path; 43 } 44 45 51 public Element getElement() { 52 return element; 53 } 54 55 61 public int getStartOffset() { 62 return start; 63 } 64 65 76 public int getOffset() { 77 return offset; 78 } 79 80 86 public int getEndOffset() { 87 return end; 88 } 89 90 97 public String getSourceFileName() { 98 return path; 99 } 100 101 106 public abstract String getSource(); 107 } 108 | Popular Tags |