Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
GGshuoshuo
spring-framework
提交
a2aa82eb
S
spring-framework
项目概览
GGshuoshuo
/
spring-framework
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a2aa82eb
编写于
6月 22, 2016
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polishing
上级
981d4494
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
7 deletion
+14
-7
spring-context/src/main/java/org/springframework/context/weaving/AspectJWeavingEnabler.java
...pringframework/context/weaving/AspectJWeavingEnabler.java
+13
-6
spring-core/src/main/java/org/springframework/core/MethodParameter.java
...c/main/java/org/springframework/core/MethodParameter.java
+1
-1
未找到文件。
spring-context/src/main/java/org/springframework/context/weaving/AspectJWeavingEnabler.java
浏览文件 @
a2aa82eb
/*
* Copyright 2002-201
3
the original author or authors.
* Copyright 2002-201
6
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -16,7 +16,6 @@
package
org.springframework.context.weaving
;
import
java.lang.instrument.ClassFileTransformer
;
import
java.lang.instrument.IllegalClassFormatException
;
import
java.security.ProtectionDomain
;
...
...
@@ -44,12 +43,13 @@ import org.springframework.instrument.classloading.LoadTimeWeaver;
public
class
AspectJWeavingEnabler
implements
BeanFactoryPostProcessor
,
BeanClassLoaderAware
,
LoadTimeWeaverAware
,
Ordered
{
public
static
final
String
ASPECTJ_AOP_XML_RESOURCE
=
"META-INF/aop.xml"
;
private
ClassLoader
beanClassLoader
;
private
LoadTimeWeaver
loadTimeWeaver
;
public
static
final
String
ASPECTJ_AOP_XML_RESOURCE
=
"META-INF/aop.xml"
;
@Override
public
void
setBeanClassLoader
(
ClassLoader
classLoader
)
{
...
...
@@ -71,6 +71,12 @@ public class AspectJWeavingEnabler
enableAspectJWeaving
(
this
.
loadTimeWeaver
,
this
.
beanClassLoader
);
}
/**
* Enable AspectJ weaving with the given {@link LoadTimeWeaver}.
* @param weaverToUse the LoadTimeWeaver to apply to (or {@code null} for a default weaver)
* @param beanClassLoader the class loader to create a default weaver for (if necessary)
*/
public
static
void
enableAspectJWeaving
(
LoadTimeWeaver
weaverToUse
,
ClassLoader
beanClassLoader
)
{
if
(
weaverToUse
==
null
)
{
if
(
InstrumentationLoadTimeWeaver
.
isInstrumentationAvailable
())
{
...
...
@@ -80,8 +86,8 @@ public class AspectJWeavingEnabler
throw
new
IllegalStateException
(
"No LoadTimeWeaver available"
);
}
}
weaverToUse
.
addTransformer
(
new
AspectJClassBypassingClassFileTransformer
(
new
ClassPreProcessorAgentAdapter
()));
weaverToUse
.
addTransformer
(
new
AspectJClassBypassingClassFileTransformer
(
new
ClassPreProcessorAgentAdapter
()));
}
...
...
@@ -108,4 +114,5 @@ public class AspectJWeavingEnabler
return
this
.
delegate
.
transform
(
loader
,
className
,
classBeingRedefined
,
protectionDomain
,
classfileBuffer
);
}
}
}
spring-core/src/main/java/org/springframework/core/MethodParameter.java
浏览文件 @
a2aa82eb
...
...
@@ -394,8 +394,8 @@ public class MethodParameter {
/**
* Return the nested type of the method/constructor parameter.
* @return the parameter type (never {@code null})
* @see #getNestingLevel()
* @since 3.1
* @see #getNestingLevel()
*/
public
Class
<?>
getNestedParameterType
()
{
if
(
this
.
nestingLevel
>
1
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录