Package org.emftext.language.java
Class JavaClasspath
java.lang.Object
org.emftext.language.java.JavaClasspath
This class is responsible for managing and retrieving Java resources to establish inter-model references between
different Java classes represented as EMF-models.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
boolean
existsPackage
(String packageName) static JavaClasspath
get()
static JavaClasspath
static JavaClasspath
static JavaClasspath
get
(ResourceSet set) getConcreteClassifier
(String fullQualifiedClassifierName) getConcreteClassifiers
(String packageName) getPackage
(String packageName) boolean
isPackageRegistered
(String packageName) boolean
isRegistered
(String fullQualifiedName) 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.void
registerClassifier
(CompilationUnit compilationUnit, URI uri) Registers all classes defined in the given compilation unit.void
registerJavaRoot
(JavaRoot root, URI physicalUri) void
registerModule
(String moduleName, URI physicalUri) void
registerModule
(Module module, URI physicalUri) void
registerPackage
(String packageName, URI physicalUri) void
registerPackage
(Package pack, URI physicalUri) void
Registers all classes of the Java standard library (src.zip
for Java 9+) located atSystem.getProperty("java.home")
.void
registerZip
(URI zipURI) Registers all source and class files within a zip file.static void
static void
static void
remove
(ResourceSet set) void
unRegisterClassifier
(String packageName, String classifierName) Removes the classifier identified by its package and name from the class path.
-
Method Details
-
get
-
get
-
get
-
get
-
remove
-
remove
-
remove
-
enableLocalRegistration
public void enableLocalRegistration() -
clear
public void clear() -
registerJavaRoot
-
registerPackage
-
registerPackage
-
registerModule
-
registerModule
-
getPackage
-
getModule
-
getConcreteClassifier
-
getConcreteClassifiers
-
registerStdLib
public void registerStdLib()Registers all classes of the Java standard library (src.zip
for Java 9+) located atSystem.getProperty("java.home")
. -
registerZip
Registers all source and class files within a zip file.- Parameters:
zipURI
- URI pointing to the zip file.
-
existsPackage
-
getURIMap
-
registerClassifier
Registers all classes defined in the given compilation unit.- Parameters:
compilationUnit
- the given compilation unit.uri
- the physical URI of the compilation unit.
-
registerClassifier
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
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
-
isRegistered
-