File tree Expand file tree Collapse file tree 5 files changed +18
-13
lines changed
src/main/java/org/apache/bcel Expand file tree Collapse file tree 5 files changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ This is a version of BCEL that is annotated with type annotations for the Checke
44To build this project
55---------------------
66
7+ Use a Java 8 JDK.
8+
79```
810mvn -B -Dmaven.test.skip=true package
911```
Original file line number Diff line number Diff line change 117117 <configuration >
118118 <excludes >
119119 <exclude >README-typetools.txt</exclude >
120- <exclude >TAGS</exclude >
120+ <exclude >**/ TAGS</exclude >
121121 <exclude >cfMavenCentral.xml</exclude >
122122 <exclude >src/test/resources/**</exclude >
123123 <exclude >docs/*.bib</exclude >
Original file line number Diff line number Diff line change 1616 */
1717package org .apache .bcel .classfile ;
1818
19+ import org .checkerframework .checker .index .qual .NonNegative ;
20+ import org .checkerframework .checker .signature .qual .Identifier ;
21+ import org .checkerframework .dataflow .qual .Pure ;
22+ import org .checkerframework .framework .qual .AnnotatedFor ;
23+
1924import java .io .DataInput ;
2025import java .io .DataInputStream ;
2126import java .io .DataOutputStream ;
2227import java .io .IOException ;
2328import java .util .Arrays ;
2429
25- import org .checkerframework .checker .index .qual .NonNegative ;
26- import org .checkerframework .dataflow .qual .Pure ;
27- import org .checkerframework .framework .qual .AnnotatedFor ;
28-
2930/**
3031 * Abstract super class for fields and methods.
3132 */
@@ -212,7 +213,7 @@ public final String getGenericSignature() {
212213 /**
213214 * @return Name of object, i.e., method name or field name
214215 */
215- public final String getName () {
216+ public final @ Identifier String getName () {
216217 return constant_pool .getConstantUtf8 (name_index ).getBytes ();
217218 }
218219
Original file line number Diff line number Diff line change 2525import org .apache .bcel .classfile .Attribute ;
2626
2727import org .checkerframework .checker .nullness .qual .EnsuresNonNull ;
28+ import org .checkerframework .checker .signature .qual .Identifier ;
2829import org .checkerframework .dataflow .qual .Pure ;
2930
3031/**
@@ -116,7 +117,7 @@ public ConstantPoolGen getConstantPool() {
116117 */
117118 @ Override
118119 @ Pure
119- public String getName () {
120+ public @ Identifier String getName () {
120121 return name ;
121122 }
122123
@@ -164,7 +165,7 @@ public void setConstantPool(final ConstantPoolGen cp) { // TODO could be package
164165 }
165166
166167 @ Override
167- public void setName (final String name ) { // TODO could be package-protected?
168+ public void setName (final @ Identifier String name ) { // TODO could be package-protected?
168169 this .name = name ;
169170 }
170171
Original file line number Diff line number Diff line change 1616 */
1717package org .apache .bcel .generic ;
1818
19+ import org .checkerframework .checker .index .qual .NonNegative ;
20+ import org .checkerframework .checker .signature .qual .ClassGetName ;
21+ import org .checkerframework .checker .signature .qual .Identifier ;
22+ import org .checkerframework .framework .qual .AnnotatedFor ;
23+
1924import java .util .StringTokenizer ;
2025
2126import org .apache .bcel .Const ;
2429import org .apache .bcel .classfile .ConstantPool ;
2530import org .apache .bcel .classfile .Utility ;
2631
27- import org .checkerframework .checker .index .qual .NonNegative ;
28- import org .checkerframework .checker .signature .qual .ClassGetName ;
29- import org .checkerframework .framework .qual .AnnotatedFor ;
30-
3132/**
3233 * Super class for the INVOKExxx family of instructions.
3334 */
@@ -91,7 +92,7 @@ public Type[] getArgumentTypes(final ConstantPoolGen cpg) {
9192 /**
9293 * @return name of referenced method.
9394 */
94- public String getMethodName (final ConstantPoolGen cpg ) {
95+ public @ Identifier String getMethodName (final ConstantPoolGen cpg ) {
9596 return getName (cpg );
9697 }
9798
You can’t perform that action at this time.
0 commit comments