Package com.sun.enterprise.module.impl
Class ClassLoaderFacade
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
com.sun.enterprise.module.impl.ClassLoaderFacade
- All Implemented Interfaces:
Closeable,AutoCloseable
Facade for
ModuleClassLoader to only expose public classes.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate static final URL[]private ModuleClassLoader -
Constructor Summary
ConstructorsConstructorDescriptionClassLoaderFacade(ModuleClassLoader privateLoader) Creates a new instance of ClassLoaderFacade -
Method Summary
Modifier and TypeMethodDescriptionvoiddumpState(PrintStream writer) protected voidfinalize()protected ClassfindResource(String name) (package private) URLfindResourceDirect(String name) Works likefindResource(String)but only looks at this module, without delegating to ancestors.findResources(String name) (package private) ClassTries to find a class from theModuleClassLoaderthat this facade is wrapping, without doing further delegation to ancestors.String[](package private) booleanmatchExportedPackage(String name) voidsetPublicPkgs(String[] publicPkgs) toString()Methods inherited from class java.net.URLClassLoader
addURL, close, definePackage, getPermissions, getResourceAsStream, getURLs, newInstance, newInstanceMethods inherited from class java.security.SecureClassLoader
defineClass, defineClassMethods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Field Details
-
EMPTY_URLS
-
publicPkgs
-
publicSet
-
privateLoader
-
classesLoaded
private int classesLoaded
-
-
Constructor Details
-
ClassLoaderFacade
Creates a new instance of ClassLoaderFacade
-
-
Method Details
-
finalize
-
setPublicPkgs
-
getPublicPkgs
-
matchExportedPackage
-
findClass
- Overrides:
findClassin classURLClassLoader- Throws:
ClassNotFoundException
-
findResources
- Overrides:
findResourcesin classURLClassLoader- Throws:
IOException
-
findResource
- Overrides:
findResourcein classURLClassLoader
-
getClass
Tries to find a class from theModuleClassLoaderthat this facade is wrapping, without doing further delegation to ancestors.- Throws:
ClassNotFoundException
-
findResourceDirect
Works likefindResource(String)but only looks at this module, without delegating to ancestors. -
dumpState
-
toString
-