1#!/bin/bash 2 3ANNOTATIONS=( 4 org.checkerframework.checker.nullness.compatqual.MonotonicNonNullDecl 5 org.checkerframework.checker.nullness.compatqual.NullableDecl 6 org.checkerframework.checker.nullness.compatqual.NonNullDecl 7 org.checkerframework.checker.nullness.qual.NonNull 8 org.checkerframework.checker.nullness.qual.Nullable 9 org.checkerframework.checker.nullness.qual.MonotonicNonNull 10 org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 11 com.google.j2objc.annotations.J2ObjCIncompatible 12 com.google.j2objc.annotations.WeakOuter 13 com.google.j2objc.annotations.Weak 14 com.google.j2objc.annotations.ReflectionSupport 15 com.google.j2objc.annotations.RetainedWith 16) 17 18for a in ${ANNOTATIONS[@]}; do 19 package=${a%.*} 20 class=${a##*.} 21 dir=$(dirname $0)/src/${package//.//} 22 file=${class}.java 23 24 mkdir -p ${dir} 25 sed -e"s/__PACKAGE__/${package}/" -e"s/__CLASS__/${class}/" tmpl.java > ${dir}/${file} 26done 27 28f=$(dirname $0)/src/com/google/j2objc/annotations/ReflectionSupport.java 29head -n-1 ${f} > ${f}.tmp 30 31cat >> ${f}.tmp <<EOF 32public @interface ReflectionSupport { 33 enum Level { 34 FULL 35 } 36 37 Level value(); 38} 39EOF 40 41mv ${f}.tmp ${f} 42 43