summaryrefslogtreecommitdiff
path: root/examples/annotations
diff options
context:
space:
mode:
Diffstat (limited to 'examples/annotations')
-rw-r--r--examples/annotations/examples.pro4
-rw-r--r--examples/annotations/examples/Applet.java3
-rw-r--r--examples/annotations/examples/Application.java3
-rw-r--r--examples/annotations/examples/Bean.java3
-rw-r--r--examples/annotations/examples/NativeCallBack.java14
-rw-r--r--examples/annotations/lib/annotations.jarbin6126 -> 6122 bytes
6 files changed, 19 insertions, 8 deletions
diff --git a/examples/annotations/examples.pro b/examples/annotations/examples.pro
index 3a47183..d2b212c 100644
--- a/examples/annotations/examples.pro
+++ b/examples/annotations/examples.pro
@@ -32,14 +32,14 @@
# Preserve all native method names and the names of their classes.
--keepclasseswithmembernames class * {
+-keepclasseswithmembernames,includedescriptorclasses class * {
native <methods>;
}
# Preserve the special static methods that are required in all enumeration
# classes.
--keepclassmembers class * extends java.lang.Enum {
+-keepclassmembers,allowoptimization enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
diff --git a/examples/annotations/examples/Applet.java b/examples/annotations/examples/Applet.java
index 8a5874b..e5b7acc 100644
--- a/examples/annotations/examples/Applet.java
+++ b/examples/annotations/examples/Applet.java
@@ -8,7 +8,8 @@ import proguard.annotation.*;
* You can then process it with:
* java -jar ../../../lib/proguard.jar @ ../examples.pro
*
- * The annotation will preserve the class and its essential methods.
+ * The annotation will preserve the class and its essential methods,
+ * as a result of the specifications in lib/annotations.pro.
*/
@Keep
public class Applet extends java.applet.Applet
diff --git a/examples/annotations/examples/Application.java b/examples/annotations/examples/Application.java
index f8d5060..777d286 100644
--- a/examples/annotations/examples/Application.java
+++ b/examples/annotations/examples/Application.java
@@ -8,7 +8,8 @@ import proguard.annotation.KeepApplication;
* You can then process it with:
* java -jar ../../../lib/proguard.jar @ ../examples.pro
*
- * The annotation will preserve the class and its main method.
+ * The annotation will preserve the class and its main method,
+ * as a result of the specifications in lib/annotations.pro.
*/
@KeepApplication
public class Application
diff --git a/examples/annotations/examples/Bean.java b/examples/annotations/examples/Bean.java
index 0544bf3..aacb501 100644
--- a/examples/annotations/examples/Bean.java
+++ b/examples/annotations/examples/Bean.java
@@ -8,7 +8,8 @@ import proguard.annotation.*;
* You can then process it with:
* java -jar ../../../lib/proguard.jar @ ../examples.pro
*
- * The annotations will preserve the class and its public getters and setters.
+ * The annotations will preserve the class and its public getters and setters,
+ * as a result of the specifications in lib/annotations.pro.
*/
@Keep
@KeepPublicGettersSetters
diff --git a/examples/annotations/examples/NativeCallBack.java b/examples/annotations/examples/NativeCallBack.java
index 2c72f7b..a4e5583 100644
--- a/examples/annotations/examples/NativeCallBack.java
+++ b/examples/annotations/examples/NativeCallBack.java
@@ -8,7 +8,8 @@ import proguard.annotation.*;
* You can then process it with:
* java -jar ../../../lib/proguard.jar @ ../examples.pro
*
- * The annotation will preserve the class and its main method.
+ * The annotation will preserve the class and its main method,
+ * as a result of the specifications in lib/annotations.pro.
*/
@KeepApplication
public class NativeCallBack
@@ -16,8 +17,9 @@ public class NativeCallBack
/**
* Suppose this is a native method that computes an answer.
*
- * The -keep option regular ProGuard configuration will make sure it is
- * not renamed when processing this code.
+ * The -keep option for native methods in the regular ProGuard
+ * configuration will make sure it is not removed or renamed when
+ * processing this code.
*/
public native int computeAnswer();
@@ -35,6 +37,12 @@ public class NativeCallBack
}
+ /**
+ * The main entry point of the application.
+ *
+ * The @KeepApplication annotation of this class will make sure it is not
+ * removed or renamed when processing this code.
+ */
public static void main(String[] args)
{
int answer = new NativeCallBack().computeAnswer();
diff --git a/examples/annotations/lib/annotations.jar b/examples/annotations/lib/annotations.jar
index f43f24e..d931505 100644
--- a/examples/annotations/lib/annotations.jar
+++ b/examples/annotations/lib/annotations.jar
Binary files differ