org.glassfish.hk2.bootstrap.impl
Class Hk2LoaderPopulatorPostProcessor

java.lang.Object
  extended by org.glassfish.hk2.bootstrap.impl.Hk2LoaderPopulatorPostProcessor
All Implemented Interfaces:
PopulatorPostProcessor

public class Hk2LoaderPopulatorPostProcessor
extends Object
implements PopulatorPostProcessor

A Simple PopulatorPostProcessor that uses the given classloader to override default HK2Loader behavior

Author:
mtaube

Constructor Summary
Hk2LoaderPopulatorPostProcessor(ClassLoader classLoader)
          Creates the post-processor to use the given classloader
 
Method Summary
 List<DescriptorImpl> process(DescriptorImpl descriptorImpl)
          Uses the given classloader to load the class from the descriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hk2LoaderPopulatorPostProcessor

public Hk2LoaderPopulatorPostProcessor(ClassLoader classLoader)
Creates the post-processor to use the given classloader

Parameters:
classLoader - The classloader to use, may not be null
Method Detail

process

public List<DescriptorImpl> process(DescriptorImpl descriptorImpl)
Uses the given classloader to load the class from the descriptor

Specified by:
process in interface PopulatorPostProcessor
Parameters:
descriptorImpl - The descriptorImpl read from some external source. This processor can modify this descriptor fully.
Returns:
A list of descriptors to be added to the system. If this returns non-null only the descriptors from this list will be added to the system (hence returning an empty list effectively drops the incoming descriptor). If this returns null then the incoming descriptor will be added to the system.


Copyright © 2012 Oracle Corporation. All Rights Reserved.