org.springframework.instrument.classloading.SimpleThrowawayClassLoader Java Examples

The following examples show how to use org.springframework.instrument.classloading.SimpleThrowawayClassLoader. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SpringPersistenceUnitInfo.java    From spring-analysis-note with MIT License 5 votes vote down vote up
/**
 * This implementation delegates to the LoadTimeWeaver, if specified.
 */
@Override
public ClassLoader getNewTempClassLoader() {
	ClassLoader tcl = (this.loadTimeWeaver != null ? this.loadTimeWeaver.getThrowawayClassLoader() :
			new SimpleThrowawayClassLoader(this.classLoader));
	String packageToExclude = getPersistenceProviderPackageName();
	if (packageToExclude != null && tcl instanceof DecoratingClassLoader) {
		((DecoratingClassLoader) tcl).excludePackage(packageToExclude);
	}
	return tcl;
}
 
Example #2
Source File: SpringPersistenceUnitInfo.java    From java-technology-stack with MIT License 5 votes vote down vote up
/**
 * This implementation delegates to the LoadTimeWeaver, if specified.
 */
@Override
public ClassLoader getNewTempClassLoader() {
	ClassLoader tcl = (this.loadTimeWeaver != null ? this.loadTimeWeaver.getThrowawayClassLoader() :
			new SimpleThrowawayClassLoader(this.classLoader));
	String packageToExclude = getPersistenceProviderPackageName();
	if (packageToExclude != null && tcl instanceof DecoratingClassLoader) {
		((DecoratingClassLoader) tcl).excludePackage(packageToExclude);
	}
	return tcl;
}
 
Example #3
Source File: SpringPersistenceUnitInfo.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/**
 * This implementation delegates to the LoadTimeWeaver, if specified.
 */
@Override
public ClassLoader getNewTempClassLoader() {
	ClassLoader tcl = (this.loadTimeWeaver != null ? this.loadTimeWeaver.getThrowawayClassLoader() :
			new SimpleThrowawayClassLoader(this.classLoader));
	String packageToExclude = getPersistenceProviderPackageName();
	if (packageToExclude != null && tcl instanceof DecoratingClassLoader) {
		((DecoratingClassLoader) tcl).excludePackage(packageToExclude);
	}
	return tcl;
}
 
Example #4
Source File: SpringPersistenceUnitInfo.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
/**
 * This implementation delegates to the LoadTimeWeaver, if specified.
 */
@Override
public ClassLoader getNewTempClassLoader() {
	ClassLoader tcl = (this.loadTimeWeaver != null ? this.loadTimeWeaver.getThrowawayClassLoader() :
			new SimpleThrowawayClassLoader(this.classLoader));
	String packageToExclude = getPersistenceProviderPackageName();
	if (packageToExclude != null && tcl instanceof DecoratingClassLoader) {
		((DecoratingClassLoader) tcl).excludePackage(packageToExclude);
	}
	return tcl;
}
 
Example #5
Source File: OptionalContextLoadTimeWeaver.java    From rice with Educational Community License v2.0 5 votes vote down vote up
@Override
public ClassLoader getThrowawayClassLoader() {
    if (loadTimeWeaverLoaded) {
        return this.loadTimeWeaver.getThrowawayClassLoader();
    } else {
        return new SimpleThrowawayClassLoader(getInstrumentableClassLoader());
    }
}
 
Example #6
Source File: JBossLoadTimeWeaver.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
public ClassLoader getThrowawayClassLoader() {
	return new SimpleThrowawayClassLoader(getInstrumentableClassLoader());
}
 
Example #7
Source File: JBossLoadTimeWeaver.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
public ClassLoader getThrowawayClassLoader() {
	return new SimpleThrowawayClassLoader(getInstrumentableClassLoader());
}
 
Example #8
Source File: JBossLoadTimeWeaver.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
public ClassLoader getThrowawayClassLoader() {
	return new SimpleThrowawayClassLoader(getInstrumentableClassLoader());
}
 
Example #9
Source File: JBossLoadTimeWeaver.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Override
public ClassLoader getThrowawayClassLoader() {
	return new SimpleThrowawayClassLoader(getInstrumentableClassLoader());
}