提交 ac3a1d91 编写于 作者: J Juergen Hoeller

added since tag

上级 fcfe9413
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.instrument.classloading.jboss; package org.springframework.instrument.classloading.jboss;
import java.lang.instrument.ClassFileTransformer; import java.lang.instrument.ClassFileTransformer;
...@@ -30,13 +31,15 @@ import org.springframework.util.ClassUtils; ...@@ -30,13 +31,15 @@ import org.springframework.util.ClassUtils;
* <p>Thanks to Ales Justin and Marius Bogoevici for the initial prototype.</p> * <p>Thanks to Ales Justin and Marius Bogoevici for the initial prototype.</p>
* *
* @author Costin Leau * @author Costin Leau
* @since 3.0
*/ */
public class JBossLoadTimeWeaver implements LoadTimeWeaver { public class JBossLoadTimeWeaver implements LoadTimeWeaver {
private final JBossClassLoaderAdapter classLoader; private final JBossClassLoaderAdapter classLoader;
/** /**
* Creates a new instance of the {@link JBossLoadTimeWeaver} class using * Create a new instance of the {@link JBossLoadTimeWeaver} class using
* the default {@link ClassLoader class loader}. * the default {@link ClassLoader class loader}.
* @see org.springframework.util.ClassUtils#getDefaultClassLoader() * @see org.springframework.util.ClassUtils#getDefaultClassLoader()
*/ */
...@@ -45,7 +48,7 @@ public class JBossLoadTimeWeaver implements LoadTimeWeaver { ...@@ -45,7 +48,7 @@ public class JBossLoadTimeWeaver implements LoadTimeWeaver {
} }
/** /**
* Creates a new instance of the {@link JBossLoadTimeWeaver} class using * Create a new instance of the {@link JBossLoadTimeWeaver} class using
* the supplied {@link ClassLoader}. * the supplied {@link ClassLoader}.
* @param classLoader the <code>ClassLoader</code> to delegate to for * @param classLoader the <code>ClassLoader</code> to delegate to for
* weaving (must not be <code>null</code>) * weaving (must not be <code>null</code>)
...@@ -55,6 +58,7 @@ public class JBossLoadTimeWeaver implements LoadTimeWeaver { ...@@ -55,6 +58,7 @@ public class JBossLoadTimeWeaver implements LoadTimeWeaver {
this.classLoader = new JBossClassLoaderAdapter(classLoader); this.classLoader = new JBossClassLoaderAdapter(classLoader);
} }
public void addTransformer(ClassFileTransformer transformer) { public void addTransformer(ClassFileTransformer transformer) {
this.classLoader.addTransformer(transformer); this.classLoader.addTransformer(transformer);
} }
...@@ -66,4 +70,5 @@ public class JBossLoadTimeWeaver implements LoadTimeWeaver { ...@@ -66,4 +70,5 @@ public class JBossLoadTimeWeaver implements LoadTimeWeaver {
public ClassLoader getThrowawayClassLoader() { public ClassLoader getThrowawayClassLoader() {
return new SimpleThrowawayClassLoader(getInstrumentableClassLoader()); return new SimpleThrowawayClassLoader(getInstrumentableClassLoader());
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册