Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
40b188d1
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
40b188d1
编写于
5月 10, 2013
作者:
D
darcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8014249: Add Modifer.parameterModifiers()
Reviewed-by: mduigou, mchung
上级
28410374
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
42 addition
and
8 deletion
+42
-8
src/share/classes/java/lang/reflect/Modifier.java
src/share/classes/java/lang/reflect/Modifier.java
+42
-8
未找到文件。
src/share/classes/java/lang/reflect/Modifier.java
浏览文件 @
40b188d1
...
@@ -350,8 +350,19 @@ public class Modifier {
...
@@ -350,8 +350,19 @@ public class Modifier {
return
(
mod
&
MANDATED
)
!=
0
;
return
(
mod
&
MANDATED
)
!=
0
;
}
}
/**
// Note on the FOO_MODIFIERS fields and fooModifiers() methods:
* See JLSv3 section 8.1.1.
// the sets of modifiers are not guaranteed to be constants
// across time and Java SE releases. Therefore, it would not be
// appropriate to expose an external interface to this information
// that would allow the values to be treated as Java-level
// constants since the values could be constant folded and updates
// to the sets of modifiers missed. Thus, the fooModifiers()
// methods return an unchanging values for a given release, but a
// value that can potentially change over time.
/**
* The Java source modifiers that can be applied to a class.
* @jls 8.1.1 Class Modifiers
*/
*/
private
static
final
int
CLASS_MODIFIERS
=
private
static
final
int
CLASS_MODIFIERS
=
Modifier
.
PUBLIC
|
Modifier
.
PROTECTED
|
Modifier
.
PRIVATE
|
Modifier
.
PUBLIC
|
Modifier
.
PROTECTED
|
Modifier
.
PRIVATE
|
...
@@ -359,7 +370,8 @@ public class Modifier {
...
@@ -359,7 +370,8 @@ public class Modifier {
Modifier
.
STRICT
;
Modifier
.
STRICT
;
/**
/**
* See JLSv3 section 9.1.1.
* The Java source modifiers that can be applied to an interface.
* @jls 9.1.1 Interface Modifiers
*/
*/
private
static
final
int
INTERFACE_MODIFIERS
=
private
static
final
int
INTERFACE_MODIFIERS
=
Modifier
.
PUBLIC
|
Modifier
.
PROTECTED
|
Modifier
.
PRIVATE
|
Modifier
.
PUBLIC
|
Modifier
.
PROTECTED
|
Modifier
.
PRIVATE
|
...
@@ -367,13 +379,15 @@ public class Modifier {
...
@@ -367,13 +379,15 @@ public class Modifier {
/**
/**
* See JLSv3 section 8.8.3.
* The Java source modifiers that can be applied to a constructor.
* @jls 8.8.3 Constructor Modifiers
*/
*/
private
static
final
int
CONSTRUCTOR_MODIFIERS
=
private
static
final
int
CONSTRUCTOR_MODIFIERS
=
Modifier
.
PUBLIC
|
Modifier
.
PROTECTED
|
Modifier
.
PRIVATE
;
Modifier
.
PUBLIC
|
Modifier
.
PROTECTED
|
Modifier
.
PRIVATE
;
/**
/**
* See JLSv3 section 8.4.3.
* The Java source modifiers that can be applied to a method.
* @jls8.4.3 Method Modifiers
*/
*/
private
static
final
int
METHOD_MODIFIERS
=
private
static
final
int
METHOD_MODIFIERS
=
Modifier
.
PUBLIC
|
Modifier
.
PROTECTED
|
Modifier
.
PRIVATE
|
Modifier
.
PUBLIC
|
Modifier
.
PROTECTED
|
Modifier
.
PRIVATE
|
...
@@ -381,13 +395,21 @@ public class Modifier {
...
@@ -381,13 +395,21 @@ public class Modifier {
Modifier
.
SYNCHRONIZED
|
Modifier
.
NATIVE
|
Modifier
.
STRICT
;
Modifier
.
SYNCHRONIZED
|
Modifier
.
NATIVE
|
Modifier
.
STRICT
;
/**
/**
* See JLSv3 section 8.3.1.
* The Java source modifiers that can be applied to a field.
* @jls 8.3.1 Field Modifiers
*/
*/
private
static
final
int
FIELD_MODIFIERS
=
private
static
final
int
FIELD_MODIFIERS
=
Modifier
.
PUBLIC
|
Modifier
.
PROTECTED
|
Modifier
.
PRIVATE
|
Modifier
.
PUBLIC
|
Modifier
.
PROTECTED
|
Modifier
.
PRIVATE
|
Modifier
.
STATIC
|
Modifier
.
FINAL
|
Modifier
.
TRANSIENT
|
Modifier
.
STATIC
|
Modifier
.
FINAL
|
Modifier
.
TRANSIENT
|
Modifier
.
VOLATILE
;
Modifier
.
VOLATILE
;
/**
* The Java source modifiers that can be applied to a method or constructor parameter.
* @jls 8.4.1 Formal Parameters
*/
private
static
final
int
PARAMETER_MODIFIERS
=
Modifier
.
FINAL
;
/**
/**
*
*
*/
*/
...
@@ -411,7 +433,7 @@ public class Modifier {
...
@@ -411,7 +433,7 @@ public class Modifier {
* Return an {@code int} value OR-ing together the source language
* Return an {@code int} value OR-ing together the source language
* modifiers that can be applied to an interface.
* modifiers that can be applied to an interface.
* @return an {@code int} value OR-ing together the source language
* @return an {@code int} value OR-ing together the source language
* modifiers that can be applied to an inteface.
* modifiers that can be applied to an inte
r
face.
*
*
* @jls 9.1.1 Interface Modifiers
* @jls 9.1.1 Interface Modifiers
* @since 1.7
* @since 1.7
...
@@ -446,7 +468,6 @@ public class Modifier {
...
@@ -446,7 +468,6 @@ public class Modifier {
return
METHOD_MODIFIERS
;
return
METHOD_MODIFIERS
;
}
}
/**
/**
* Return an {@code int} value OR-ing together the source language
* Return an {@code int} value OR-ing together the source language
* modifiers that can be applied to a field.
* modifiers that can be applied to a field.
...
@@ -459,4 +480,17 @@ public class Modifier {
...
@@ -459,4 +480,17 @@ public class Modifier {
public
static
int
fieldModifiers
()
{
public
static
int
fieldModifiers
()
{
return
FIELD_MODIFIERS
;
return
FIELD_MODIFIERS
;
}
}
/**
* Return an {@code int} value OR-ing together the source language
* modifiers that can be applied to a parameter.
* @return an {@code int} value OR-ing together the source language
* modifiers that can be applied to a parameter.
*
* @jls 8.4.1 Formal Parameters
* @since 1.8
*/
public
static
int
parameterModifiers
()
{
return
PARAMETER_MODIFIERS
;
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录