Package org.glassfish.hk2.bootstrap.impl
Class Hk2LoaderPopulatorPostProcessor
- java.lang.Object
-
- org.glassfish.hk2.bootstrap.impl.Hk2LoaderPopulatorPostProcessor
-
- All Implemented Interfaces:
PopulatorPostProcessor
public class Hk2LoaderPopulatorPostProcessor extends java.lang.Object implements PopulatorPostProcessor
A Simple PopulatorPostProcessor that uses the given classloader to override default HK2Loader behavior
-
-
Constructor Summary
Constructors Constructor Description Hk2LoaderPopulatorPostProcessor()
Hk2LoaderPopulatorPostProcessor(java.lang.ClassLoader classLoader)
Creates the post-processor to use the given classloader
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DescriptorImpl
process(ServiceLocator serviceLocator, DescriptorImpl descriptorImpl)
Uses the given classloader to load the class from the descriptor
-
-
-
Field Detail
-
hk2Loader
private final HK2Loader hk2Loader
-
-
Constructor Detail
-
Hk2LoaderPopulatorPostProcessor
public Hk2LoaderPopulatorPostProcessor(java.lang.ClassLoader classLoader)
Creates the post-processor to use the given classloader- Parameters:
classLoader
- The classloader to use, may not be null
-
Hk2LoaderPopulatorPostProcessor
public Hk2LoaderPopulatorPostProcessor()
-
-
Method Detail
-
process
public DescriptorImpl process(ServiceLocator serviceLocator, DescriptorImpl descriptorImpl)
Uses the given classloader to load the class from the descriptor- Specified by:
process
in interfacePopulatorPostProcessor
- Parameters:
serviceLocator
- the ServiceLocator being populated. Will not be nulldescriptorImpl
- The descriptorImpl read from some external source. This processor can modify this descriptor fully- Returns:
- The descriptor to be added to the system. If this returns null then the descriptorImpl passed in will NOT be added to the system. Implementations may return the descriptor passed in, but do not have to. The descriptor added to the system will be the one returned from this method
-
-