你是否模糊了商业Java代码?(Do you obfuscate your commercial Java code? [closed])
我想知道有没有人在自己的商业产品上使用商业/免费的java混淆器。 我只知道一个实际上在蚂蚁构建步骤中发生混淆的项目。
你模糊吗 如果是这样,为什么你会混淆?
它是真正的保护代码的一种方式,还是开发人员/管理者更好的感觉?
编辑:好的,我确切地说,关于我的观点:你是否混淆了保护你的IP(你的算法,你放在你的产品中的工作)? 出于安全考虑,我不会混淆,那感觉不对。 所以我只是在谈论保护您的应用程序代码与竞争对手。
@staffan有一个好点:
远离链接代码流的原因是,其中一些更改使得JVM无法有效地优化代码。 实际上它实际上会降低应用程序的性能。
I wonder if anyone uses commercial/free java obfuscators on his own commercial product. I know only about one project that actually had an obfuscating step in the ant build step for releases.
Do you obfuscate? And if so, why do you obfuscate?
Is it really a way to protect the code or is it just a better feeling for the developers/managers?
edit: Ok, I to be exact about my point: Do you obfuscate to protect your IP (your algorithms, the work you've put into your product)? I won't obfuscate for security reasons, that doesn't feel right. So I'm only talking about protecting your applications code against competitors.
@staffan has a good point:
The reason to stay away from chaining code flow is that some of those changes makes it impossible for the JVM to efficiently optimize the code. In effect it will actually degrade the performance of your application.
原文:https://stackoverflow.com/questions/12088
满意答案
在Objective-C中,属性中的
copy
属性意味着合成的setter将如下所示:-(void)setMasterBirdSightingList:(NSMutableArray*)newValue { if (_masterBirdSightingList == newValue) return; // NSMutableArray* oldValue = _masterBirdSightingList; _masterBirdSightingList = [newValue copy]; // [oldValue release]; // <-- not applicable in ARC. }
并且点语法将始终转换为
[self setMasterBirdSightingList:sightingList];
无论属性的属性如何。
“分配给另一个空间以保存来自sightingList的内容”的东西是通过
-copy
方法完成的。 将参数传递给setter的newValue
参数的方式无关紧要。
编辑 :正如注释中提到的@David一样 ,可变类型的
-copy
方法返回一个不可变对象。 您必须覆盖setter才能调用-mutableCopy
。 请参阅使用可变对象的Obj-C 2.0属性的最佳方法是什么,例如NSMutableArray? 。In Objective-C, the
copy
attribute in a property means the setter synthesized will look like this:-(void)setMasterBirdSightingList:(NSMutableArray*)newValue { if (_masterBirdSightingList == newValue) return; // NSMutableArray* oldValue = _masterBirdSightingList; _masterBirdSightingList = [newValue copy]; // [oldValue release]; // <-- not applicable in ARC. }
and that dot syntax will always be translated to
[self setMasterBirdSightingList:sightingList];
regardless of the attribute of the property.
The "allocated for another space to preserve stuffs from sightingList" stuff is done via the
-copy
method. The way you pass the argument to the setter'snewValue
parameter is irrelevant.
Edit: As @David mentioned in the comment, the
-copy
method of a mutable type returns an immutable object. You have to override the setter to call-mutableCopy
instead. See What's the best way to use Obj-C 2.0 Properties with mutable objects, such as NSMutableArray?.
相关问答
更多将NSMutableArray存储在NSArray中?(Store NSMutableArray in NSArray?)
NSMutableArray的NSInternalInconsistencyException(NSInternalInconsistencyException for NSMutableArray)
使用@property和'copy'属性分配NSMutableArray(assign NSMutableArray with @property and 'copy' attribute)
mutableCopyWithZone,复制NSMutableArray?(mutableCopyWithZone, copy NSMutableArray?)
来自不同类的NSMutableArray获取Null(NSMutableArray from different class gets Null)
让NSMutableArray属性填充枚举值(getting NSMutableArray Property filled with enumerated values)
NSMutableArray作为@property只读(NSMutableArray as @property with readonly)
将对象从一个NSMutableArray复制到另一个NSMutableArray(copy objects from one NSMutableArray to another NSMutableArray)
NSMutableArray线程安全(NSMutableArray thread safety)
NSMutableArray更改为副本,从而导致父NSMutableArray中的更改(NSMutableArray changes to the copy causing changes in the parent NSMutableArray as well)
相关文章
更多English,The Da Vinci Code,Chapter 1-3
reading notes for solr source code
There is already an open DataReader associated with this Connection which must be closed first
Java 异常处理
Java 反射问题
java WHILE 循环问题
java配置问题
微信会员注册开发【带源码】:网页授权,得到code后在当前页面获取openid,js+php实现跨域请求
Open Source Search Engines in Java
Java Applet基础
最新问答
更多如何在Laravel 5.2中使用paginate与关系?(How to use paginate with relationships in Laravel 5.2?)
linux的常用命令干什么用的
由于有四个新控制器,Auth刀片是否有任何变化?(Are there any changes in Auth blades due to four new controllers?)
如何交换返回集中的行?(How to swap rows in a return set?)
在ios 7中的UITableView部分周围绘制边界线(draw borderline around UITableView section in ios 7)
使用Boost.Spirit Qi和Lex时的空白队长(Whitespace skipper when using Boost.Spirit Qi and Lex)
Java中的不可变类(Immutable class in Java)
WordPress发布查询(WordPress post query)
如何在关系数据库中存储与IPv6兼容的地址(How to store IPv6-compatible address in a relational database)
是否可以检查对象值的条件并返回密钥?(Is it possible to check the condition of a value of an object and JUST return the key?)
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!