24小时热门版块排行榜    

查看: 1246  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 311求调剂 +5 冬十三 2026-03-15 5/250 2026-03-15 18:38 by 无际的草原
[考研] 0703化学调剂 ,六级已过,有科研经历 +4 曦熙兮 2026-03-15 4/200 2026-03-15 18:01 by JourneyLucky
[考研] 26考研一志愿中国石油大学(华东)305分求调剂 +3 嘉年新程 2026-03-15 3/150 2026-03-15 13:58 by 哈哈哈哈嘿嘿嘿
[考研] 材料专硕326求调剂 +4 墨煜姒莘 2026-03-15 4/200 2026-03-15 11:02 by dyw
[考研] 一志愿浙江大学0856材料与化工求调剂 +4 yansheng@211 2026-03-09 5/250 2026-03-14 02:10 by JourneyLucky
[考研] 云南财经大学信息学院计算机学硕专硕学位点 +3 zjptai 2026-03-10 5/250 2026-03-14 01:23 by 飞行琦
[基金申请] 有必要更换申报口吗 20+3 fannyamoy 2026-03-11 3/150 2026-03-14 00:52 by zhanghaozhu
[考研] 312求调剂 +6 陌宸希 2026-03-10 6/300 2026-03-14 00:40 by JourneyLucky
[考研] 304求调剂 +6 Mochaaaa 2026-03-12 7/350 2026-03-13 22:18 by 星空星月
[考研] 290求调剂 +9 ADT 2026-03-11 9/450 2026-03-13 21:55 by JourneyLucky
[考研] 工科,求调剂 +3 我887 2026-03-11 3/150 2026-03-13 21:39 by JourneyLucky
[考研] 315求调剂 +9 小羊小羊_ 2026-03-11 10/500 2026-03-13 21:13 by SXNU李老师
[考研] 材料与化工085600调剂求老师收留 +9 jiaanl 2026-03-11 9/450 2026-03-13 20:22 by JourneyLucky
[考研] 328化工专硕求调剂 +4 。,。,。,。i 2026-03-12 4/200 2026-03-13 14:44 by JourneyLucky
[考研] 0817化学工程与技术考研312分调剂 +3 T123 tt 2026-03-12 3/150 2026-03-13 10:49 by houyaoxu
[考研] 282分材料专业求调剂院校 +18 枫桥ZL 2026-03-09 25/1250 2026-03-13 10:47 by 白夜悠长
[考研] 268求调剂 +4 好运连绵不绝 2026-03-12 4/200 2026-03-13 10:45 by hyswxzs
[考研] 293求调剂,一志愿陕师大生物学 +3 ??????.?.??? 2026-03-09 3/150 2026-03-11 10:02 by 学员8dgXkO
[考研] 298求调剂 +3 Vv呀! 2026-03-10 3/150 2026-03-10 22:40 by 剑诗杜康
[考研] 327分求调剂086 +4 西红柿?小帅 2026-03-09 7/350 2026-03-10 14:47 by ruiyingmiao
信息提示
请填处理意见