Java Code Examples for org.springframework.instrument.classloading.SimpleThrowawayClassLoader

The following examples show how to use org.springframework.instrument.classloading.SimpleThrowawayClassLoader. These examples are extracted from open source projects. 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 Project: spring-analysis-note   Source File: SpringPersistenceUnitInfo.java    License: 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 Project: java-technology-stack   Source File: SpringPersistenceUnitInfo.java    License: 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
/**
 * 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
/**
 * 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
@Override
public ClassLoader getThrowawayClassLoader() {
    if (loadTimeWeaverLoaded) {
        return this.loadTimeWeaver.getThrowawayClassLoader();
    } else {
        return new SimpleThrowawayClassLoader(getInstrumentableClassLoader());
    }
}
 
Example 6
Source Project: spring-analysis-note   Source File: JBossLoadTimeWeaver.java    License: MIT License 4 votes vote down vote up
@Override
public ClassLoader getThrowawayClassLoader() {
	return new SimpleThrowawayClassLoader(getInstrumentableClassLoader());
}
 
Example 7
Source Project: java-technology-stack   Source File: JBossLoadTimeWeaver.java    License: MIT License 4 votes vote down vote up
@Override
public ClassLoader getThrowawayClassLoader() {
	return new SimpleThrowawayClassLoader(getInstrumentableClassLoader());
}
 
Example 8
Source Project: lams   Source File: JBossLoadTimeWeaver.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
public ClassLoader getThrowawayClassLoader() {
	return new SimpleThrowawayClassLoader(getInstrumentableClassLoader());
}
 
Example 9
Source Project: spring4-understanding   Source File: JBossLoadTimeWeaver.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public ClassLoader getThrowawayClassLoader() {
	return new SimpleThrowawayClassLoader(getInstrumentableClassLoader());
}