-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for annotation default value instrumentation (#174)
- Loading branch information
1 parent
e8faa82
commit aca7b5d
Showing
5 changed files
with
43 additions
and
13 deletions.
There are no files selected for viewing
8 changes: 0 additions & 8 deletions
8
usvm-jvm-instrumentation/src/samples/java/example/AnnotatedMethodClass.java
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
usvm-jvm-instrumentation/src/samples/java/example/AnnotationsEx.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package example; | ||
|
||
public class AnnotationsEx { | ||
@MyAnnotation | ||
public static int getSelfAnnotationCount() throws NoSuchMethodException { | ||
return AnnotationsEx.class.getMethod("getSelfAnnotationCount").getAnnotations().length; | ||
} | ||
|
||
@MyAnnotation | ||
public static String getAnnotationDefaultValue() throws NoSuchMethodException { | ||
return AnnotationsEx.class | ||
.getMethod("getAnnotationDefaultValue") | ||
.getAnnotation(MyAnnotation.class) | ||
.x(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters