java学习笔记(一)续:Allatori策略标签解析(翻译)

出自官网http://www.allatori.com/doc.html#keep-names-class,由于本人英语水平有限,有哪里有问题的话希望各位指出,不喜勿喷!!!

1. allatori.xml文件

<config>
    <input basedir="input-jars" single-jar="application.jar">
        <jar in="app.jar" out="app-obf.jar"/>
        <jar in="input/*.jar" out="output/*.jar"/>

        <dir in="in-dir" out="out-dir"/>
    </input>

    <classpath basedir="library-jars">
        <!-- Adding library.jar to the classpath -->
        <jar name="library.jar"/>
        <!-- Adding all jars in the lib directory to the classpath -->
        <jar name="lib/*.jar"/>
        <!-- Adding all jars in the lib2 directory and its subdirectories to the classpath -->
        <jar name="lib2/**/*.jar"/>
    </classpath>

    <keep-names>
        <class template="class SomeClass"/>
        <class template="class * instanceof java.io.Serializable"/>
        <class template="class com.package.*"/>
        <class access="protected+">
            <field access="protected+"/>
            <method access="protected+"/>
        </class>
        <class template="class com.company.abc.*">
            <field template="public int *"/>
            <method template="public get*(*)"/>
            <method template="public set*(*)"/>
        </class>
    </keep-names>

    <watermark key="secure-key-to-extract-watermark" value="Customer: John Smith"/>

    <expiry date="2017/01/01" string="EXPIRED!"/>

    <!-- Configuration properties, all properties are optional -->
    <!-- General properties, we recommend to use these two properties -->
    <property name="log-file" value="renaming-log.xml"/>
    <property name="random-seed" value="type anything here"/>

    <!-- String encryption -->
    <property name="string-encryption" value="enable"/>
    <property name="string-encryption-type" value="fast"/>
    <property name="string-encryption-version" value="v4"/>
    <property name="string-encryption-ignored-strings" value="patterns.txt"/>

    <!-- Control flow obfuscation -->
    <property name="control-flow-obfuscation" value="enable"/>
    <property name="extensive-flow-obfuscation" value="normal"/>

    <!-- Renaming -->
    <property name="default-package" value="com.package"/>
    <property name="force-default-pack
  • 2
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值