1 19 20 package org.netbeans.modules.javacore.api; 21 22 import java.util.List ; 23 import org.netbeans.api.java.classpath.ClassPath; 24 import org.netbeans.api.mdr.MDRManager; 25 import org.netbeans.jmi.javamodel.Resource; 26 import org.netbeans.modules.javacore.internalapi.JavaMetamodel; 27 import org.openide.filesystems.FileObject; 28 import org.netbeans.jmi.javamodel.JavaModelPackage; 29 import org.netbeans.api.mdr.MDRepository; 30 31 33 public final class JavaModel { 34 private JavaModel() { 35 } 36 37 49 public static void setClassPath(ClassPath cp) { 50 JavaMetamodel.getManager().setClassPath(cp); 51 } 52 53 59 public static void setClassPath(List cps) { 60 JavaMetamodel.getManager().setClassPath(cps); 61 } 62 63 69 public static void setClassPath(Resource rsc) { 70 JavaMetamodel.getManager().setClassPath(rsc); 71 } 72 73 79 public static void setClassPath(FileObject fo) { 80 JavaMetamodel.getManager().setClassPath(fo); 81 } 82 83 88 public static Resource getResource(FileObject fo) { 89 return JavaMetamodel.getManager().getResource(fo); 90 } 91 92 99 public static Resource getResource(FileObject cpRoot, String name) { 100 return JavaMetamodel.getManager().getResource(cpRoot, name); 101 } 102 103 108 public static FileObject getFileObject(Resource r) { 109 return JavaMetamodel.getManager().getFileObject(r); 110 } 111 112 117 public static JavaModelPackage getJavaExtent(FileObject cpRoot) { 118 return JavaMetamodel.getManager().getJavaExtent(cpRoot); 119 } 120 121 127 public static JavaModelPackage getDefaultExtent() { 128 return JavaMetamodel.getManager().getDefaultExtent(); 129 } 130 131 143 public static MDRepository getJavaRepository() { 144 return JavaMetamodel.getDefaultRepository(); 145 } 146 } 147 | Popular Tags |