Class ClassFileLoader
java.lang.Object
de.inetsoftware.jwebassembly.module.ClassFileLoader
Cache and manager for the loaded ClassFiles
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a class file to the weak cache.Get the ClassFile from cache or load it.(package private) void
Add a partial class with the given instance to the loader cache.(package private) void
Replace the class in the cache with the given instance to the loader cache.
-
Field Details
-
replace
-
cache
-
loader
-
bootLoader
-
-
Constructor Details
-
ClassFileLoader
Create a new instance- Parameters:
loader
- the classloader to find the *.class files
-
-
Method Details
-
get
Get the ClassFile from cache or load it.- Parameters:
className
- the class name like "java/lang/Object"- Returns:
- the ClassFile or null
- Throws:
IOException
- If any I/O error occur
-
cache
Add a class file to the weak cache.- Parameters:
classFile
- the class file
-
replace
Replace the class in the cache with the given instance to the loader cache.- Parameters:
className
- the name of the class to replaceclassFile
- the replacing ClassFile
-
partial
Add a partial class with the given instance to the loader cache.- Parameters:
className
- the name of the class to replace like "java/lang/String"partialClassFile
- the partial ClassFile- Throws:
IOException
- If any I/O error occur
-