Improves annotation support (#161)
authorjtoman <jtoman@users.noreply.github.com>
Fri, 7 Sep 2018 19:34:36 +0000 (12:34 -0700)
committercyrille-artho <cyrille-artho@users.noreply.github.com>
Fri, 7 Sep 2018 19:34:36 +0000 (21:34 +0200)
commit28c066f86c2cd268b8c9b9959161e3d07c6146c6
treefb685d7104b69fad14badc6e80e2f70042901a04
parentcf01a64ca6c29833f99dbda8d3480c5d990ad86b
Improves annotation support (#161)

* Improves annotation support

Closes #150. Improves toString to cover all primitive types and annotation
attributes. Also adds support for:

* Default value reflection
* hashCode/equals on annotations
* nested annotations
* Ignoring missing annotations (which is what the JVM does)

* Reverts unrelated format change
18 files changed:
src/classes/gov/nasa/jpf/AnnotationProxyBase.java
src/classes/java/lang/reflect/Method.java
src/main/gov/nasa/jpf/jvm/ClassFile.java
src/main/gov/nasa/jpf/jvm/ClassFilePrinter.java
src/main/gov/nasa/jpf/jvm/ClassFileReader.java
src/main/gov/nasa/jpf/jvm/ClassFileReaderAdapter.java
src/main/gov/nasa/jpf/jvm/JVMAnnotationParser.java
src/main/gov/nasa/jpf/jvm/JVMClassInfo.java
src/main/gov/nasa/jpf/jvm/SkipAnnotation.java [new file with mode: 0644]
src/main/gov/nasa/jpf/vm/MJIEnv.java
src/peers/gov/nasa/jpf/vm/JPF_gov_nasa_jpf_AnnotationProxyBase.java
src/peers/gov/nasa/jpf/vm/JPF_java_lang_Class.java
src/peers/gov/nasa/jpf/vm/JPF_java_lang_String.java
src/peers/gov/nasa/jpf/vm/JPF_java_lang_reflect_Method.java
src/tests/gov/nasa/jpf/test/vm/basic/AnnotationDefaultValueReflectionTest.java [new file with mode: 0644]
src/tests/gov/nasa/jpf/test/vm/basic/AnnotationHashCodeEqualsTest.java [new file with mode: 0644]
src/tests/gov/nasa/jpf/test/vm/basic/AnnotationToStringTest.java [new file with mode: 0644]
src/tests/gov/nasa/jpf/test/vm/basic/MissingAnnotationClassTest.java [new file with mode: 0644]