Class JavaClasspath


  • public class JavaClasspath
    extends Object
    This class is responsible for managing and retrieving Java resources to establish inter-model references between different Java classes represented as EMF-models.
    • Method Detail

      • remove

        public static void remove​(EObject obj)
      • remove

        public static void remove​(Resource resource)
      • remove

        public static void remove​(ResourceSet set)
      • enableLocalRegistration

        public void enableLocalRegistration()
      • clear

        public void clear()
      • registerJavaRoot

        public void registerJavaRoot​(JavaRoot root,
                                     URI physicalUri)
      • registerPackage

        public void registerPackage​(Package pack,
                                    URI physicalUri)
      • registerPackage

        public void registerPackage​(String packageName,
                                    URI physicalUri)
      • registerModule

        public void registerModule​(Module module,
                                   URI physicalUri)
      • registerModule

        public void registerModule​(String moduleName,
                                   URI physicalUri)
      • getModule

        public Module getModule​(String moduleName)
      • registerStdLib

        public void registerStdLib()
        Registers all classes of the Java standard library (src.zip for Java 9+) located at System.getProperty("java.home").
      • registerZip

        public void registerZip​(URI zipURI)
        Registers all source and class files within a zip file.
        Parameters:
        zipURI - URI pointing to the zip file.
      • existsPackage

        public boolean existsPackage​(String packageName)
      • getURIMap

        public Map<URI,​URI> getURIMap()
      • registerClassifier

        public void registerClassifier​(CompilationUnit compilationUnit,
                                       URI uri)
        Registers all classes defined in the given compilation unit.
        Parameters:
        compilationUnit - the given compilation unit.
        uri - the physical URI of the compilation unit.
      • registerClassifier

        public void registerClassifier​(String packageName,
                                       String classifierName,
                                       URI physicalURI)
        Registers the classifier with the given name and package that is physically located at the given URI. If there is already a classifier registered for the given class name, the old one is replaced with the new one.
        Parameters:
        packageName - the name of the package that contains the classifier.
        classifierName - the simple name of the classifier.
        physicalURI - the URI where the classifier can be found (class or source file).
      • unRegisterClassifier

        public void unRegisterClassifier​(String packageName,
                                         String classifierName)
        Removes the classifier identified by its package and name from the class path.
        Parameters:
        packageName - name of the package.
        classifierName - name of the classifier.
      • isPackageRegistered

        public boolean isPackageRegistered​(String packageName)
      • isRegistered

        public boolean isRegistered​(String fullQualifiedName)