24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 1263  |  回复: 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.

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zcius

至尊木虫 (知名作家)

【答案】应助回帖

einsteinjw(金币+20, 翻译EPI+1): 2012-02-14 12:55:49
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
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 einsteinjw 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 一志愿北交大材料工程总分358求调剂 +8 cs0106 2026-04-05 9/450 2026-04-06 12:50 by 尚水阁主
[考研] 071000生物学调剂 +6 拉提桃 2026-04-06 6/300 2026-04-06 12:33 by ilovexiaobin
[考研] 求助071001调剂!!! +4 黄守松 2026-04-05 5/250 2026-04-06 10:55 by 1028907439
[考研] 332求调剂 +17 小小孟... 2026-04-05 18/900 2026-04-06 09:51 by 蓝云思雨
[考研] 327求调剂 +4 拾光任染 2026-04-05 4/200 2026-04-05 20:16 by 南航~万老师
[考研] 308求调剂 +4 maverick^_^ 2026-04-03 4/200 2026-04-05 19:08 by 蓝云思雨
[考研] 复试调剂 +8 春日来信- 2026-04-03 8/400 2026-04-05 18:58 by 蓝云思雨
[考研] 341求调剂 +3 学无止境,冲 2026-04-05 3/150 2026-04-05 09:40 by lbsjt
[考研] 0854求调剂 +4 assdll 2026-04-03 4/200 2026-04-04 22:17 by hemengdong
[考研] 309求调剂 +4 快乐的小白鸽 2026-04-04 5/250 2026-04-04 15:55 by cql1109
[考研] 317分 一志愿江南大学 化学工程学硕 求调剂 +6 YinTai 2026-04-03 6/300 2026-04-03 22:30 by 无际的草原
[考研] 338求调剂 +7 晟功? 2026-04-03 7/350 2026-04-03 16:46 by wxiongid
[考研] 312求调剂 +4 赊月色 2026-04-02 5/250 2026-04-03 08:21 by fangshan711
[考研] 考研调剂 +3 李木子0120 2026-04-02 5/250 2026-04-02 21:45 by dongzh2009
[考研] 261求B区调剂 +5 明仔· 2026-04-01 7/350 2026-04-02 11:17 by 邹尉尉
[考研] 348环境工程调剂 +3 吴彦祖24k 2026-04-01 3/150 2026-04-02 09:14 by nanaliuyun
[考研] 食品学硕362求调剂 +3 xuanxianxian 2026-04-01 3/150 2026-04-01 21:05 by 啊李999
[考研] 307分求调剂 +14 (o~o) 2026-03-31 15/750 2026-04-01 20:43 by longlotian
[考研] 286求调剂 +5 Sa67890. 2026-04-01 7/350 2026-04-01 19:50 by 6781022
[考研] 生物考研337分求调剂 +4 cgxin 2026-03-30 6/300 2026-03-31 14:18 by 记事本2026
信息提示
请填处理意见