1 19 20 package org.netbeans.modules.java.source.engine; 21 22 import org.netbeans.modules.java.source.engine.RootTree; 23 import com.sun.source.tree.IdentifierTree; 24 import javax.lang.model.SourceVersion; 25 import org.netbeans.modules.java.source.engine.ReattributionException; 26 import org.netbeans.modules.java.source.engine.RootTree; 27 import com.sun.source.tree.CompilationUnitTree; 28 import com.sun.source.tree.Tree; 29 import java.util.List ; 30 import javax.lang.model.element.Element; 31 import javax.lang.model.type.TypeMirror; 32 33 37 public interface ASTModel { 38 39 42 Tree getRoot(); 43 44 49 CompilationUnitTree getTopLevel(Tree tree); 50 51 56 Element getElement(Tree tree); 57 58 63 TypeMirror getType(Tree tree); 64 65 74 int getPos(Tree tree); 75 76 82 int getStartPos(Tree tree); 83 84 90 int getEndPos(Tree tree, CompilationUnitTree topLevel); 91 92 96 void setPos(Tree tree, int newPos); 97 98 101 boolean isThis(IdentifierTree t); 102 103 106 boolean isThis(Element e); 107 108 112 boolean isSynthetic(Tree tree); 113 114 121 void setElement(Tree tree, Element element); 122 123 130 void setType(Tree tree, TypeMirror type); 131 132 135 void setRoot(final RootTree tree) throws ReattributionException; 136 137 141 int getInstanceReferenceCount(Tree t); 142 143 146 SourceVersion sourceVersion(); 147 148 151 boolean isStatic(Tree tree); 152 153 158 List <? extends Tree> getChildren(Tree tree); 159 160 165 Tree[] makePath(final Tree root, final Tree target); 166 } 167 | Popular Tags |