| 查看: 1166 | 回复: 1 | ||
| 本帖产生 1 个 翻译EPI ,点击这里进行查看 | ||
einsteinjw银虫 (小有名气)
|
[求助]
帮忙翻译下英译中,急求,谢谢了,可以翻译其中一段
|
|
|
Reflection enables a Java program to analyze and modify itself. In particular, a program can discover the values of field variables and change them [ Forman 2005 ], [ Sun 2002 ]. The Java reflection API includes a method that enables fields that are normally inaccessible to be accessed under reflection. The following code prints out the names and values of all fields of an object someObject of class SomeClass; When the default security manager is used, it prevents fields that are normally inaccessible from being accessed under reflection. The default security manager throws a java.security.AccessControlException in these circumstances. However, java.lang.reflect.ReflectPermission can be granted with action suppressAccessChecks to override this default behavior. For example, although an object is ordinarily prevented from accessing private members or invoking private methods of another class, the APIs belonging to the java.lang.reflect package allow an object to do so contingent upon performing the language-defined access checks. It is important to note, however, that these access checks consider only the language-level visibility of the immediate caller. Consequently, unwary programmers can create an opportunity for a privilege escalation attack by untrusted callers. |
» 猜你喜欢
真诚求助:手里的省社科项目结项要求主持人一篇中文核心,有什么渠道能发核心吗
已经有8人回复
寻求一种能扛住强氧化性腐蚀性的容器密封件
已经有5人回复
论文投稿,期刊推荐
已经有6人回复
请问哪里可以有青B申请的本子可以借鉴一下。
已经有4人回复
孩子确诊有中度注意力缺陷
已经有14人回复
请问下大家为什么这个铃木偶联几乎不反应呢
已经有5人回复
请问有评职称,把科研教学业绩算分排序的高校吗
已经有5人回复
2025冷门绝学什么时候出结果
已经有3人回复
天津工业大学郑柳春团队欢迎化学化工、高分子化学或有机合成方向的博士生和硕士生加入
已经有4人回复
康复大学泰山学者周祺惠团队招收博士研究生
已经有6人回复
zcius
至尊木虫 (知名作家)
- 翻译EPI: 65
- 应助: 5 (幼儿园)
- 金币: 16742.4
- 散金: 810
- 红花: 8
- 帖子: 8863
- 在线: 406.9小时
- 虫号: 1123409
- 注册: 2010-10-15
- 专业: 计算机科学的基础理论
【答案】应助回帖
einsteinjw(金币+20, 翻译EPI+1): 2012-02-14 12:55:49
sltmac(金币+25): 2012-02-25 09:49:41
sltmac(金币+25): 2012-02-25 09:49:41
|
反思使得Java程序可以分析且修改自己。特别是,一个程序可以发现域变量的值,并修改它们[Forman 2005],[Sun 2002]。 Java反思API包括一个方法,使得通常无法访问的域在反思时可访问。下面的代码打印出 SomeClass 类的对象 someObject 各域的名称和值; 缺省的安全管理,防止一般不可访问的域在反思时可访问。此时,缺省的安全管理启动一个 java.security.AccessControlException。但是,java.lang.reflect.ReflectPermission 准许 suppressAccessChecks 覆盖该缺省行为。 例如,虽然一个对象通常不能访问另一个类的私有成员或调用另一个类的私有方法,但 java.lang.reflect 包中的API 可视语言定义的访问检查而允许这样做。然而要注意,这些访问检查只考虑了语言层次可见的直接调用者。因此,粗心的程序员会留下受不信任调用者进行特权升级攻击的机会。 |
2楼2012-02-14 06:16:49













回复此楼