< prev index next >

test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/NewObjects.java

Print this page

 45     public String returnObjectGeneric() {
 46         return "Object returnObjectGeneric() { return new @TA ArrayList<@TB String>(); }";
 47     }
 48 
 49     @TADescription(annotation = "TA", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
 50     public String initObject() {
 51         return "void initObject() { Object a =  new @TA String(); }";
 52     }
 53 
 54     @TADescription(annotation = "TA", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
 55     @TADescription(annotation = "TB", type = NEW,
 56             genericLocation = { 3, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE)
 57     @TADescription(annotation = "TC", type = NEW,
 58             genericLocation = { 3, 1 }, offset = ReferenceInfoUtil.IGNORE_VALUE)
 59     public String initObjectGeneric() {
 60         return "void initObjectGeneric() { Object a = new @TA HashMap<@TB String, @TC String>(); }";
 61     }
 62 
 63     @TADescription(annotation = "TA", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
 64     public String eqtestObject() {
 65         return "void eqtestObject() { if (null == new @TA String()); }";
 66     }
 67 
 68     @TADescription(annotation = "TA", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
 69     @TADescription(annotation = "TB", type = NEW,
 70             genericLocation = { 3, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE)
 71     public String eqtestObjectGeneric() {
 72         return "void eqtestObjectGeneric() { if (null == new @TA ArrayList<@TB String >()); }";
 73     }
 74 
 75     @TADescription(annotation = "TA", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE,
 76             genericLocation = {0, 0})
 77     @TADescription(annotation = "TB", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
 78     public String returnNewArray1() {
 79         return "Object returnNewArray1() { return new @TA String @TB[1]; }";
 80     }
 81 
 82     @TADescription(annotation = "TA", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE,
 83             genericLocation = {0, 0, 0, 0})
 84     @TADescription(annotation = "TB", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
 85     @TADescription(annotation = "TC", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE,
 86             genericLocation = {0, 0})
 87     public String returnNewArray2() {
 88         return "Object returnNewArray2() { return new @TA String @TB [1] @TC [2]; }";
 89     }
 90 
 91     @TADescription(annotation = "TA", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE,
 92             genericLocation = {0, 0, 0, 0})

149     public String returnObjectGenericRepeatableAnnotation() {
150         return "Object returnObjectGeneric() { return new @RTA @RTA ArrayList<@RTB @RTB String>(); }";
151     }
152 
153     @TADescription(annotation = "RTAs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
154     public String initObjectRepeatableAnnotation() {
155         return "void initObject() { Object a =  new @RTA @RTA String(); }";
156     }
157 
158     @TADescription(annotation = "RTAs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
159     @TADescription(annotation = "RTBs", type = NEW,
160             genericLocation = { 3, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE)
161     @TADescription(annotation = "RTCs", type = NEW,
162             genericLocation = { 3, 1 }, offset = ReferenceInfoUtil.IGNORE_VALUE)
163     public String initObjectGenericRepeatableAnnotation() {
164         return "void initObjectGeneric() { Object a = new @RTA @RTA HashMap<@RTB @RTB String, @RTC @RTC String>(); }";
165     }
166 
167     @TADescription(annotation = "RTAs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
168     public String eqtestObjectRepeatableAnnotation() {
169         return "void eqtestObject() { if (null == new @RTA @RTA String()); }";
170     }
171 
172     @TADescription(annotation = "RTAs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
173     @TADescription(annotation = "RTBs", type = NEW,
174             genericLocation = { 3, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE)
175     public String eqtestObjectGenericRepeatableAnnotation() {
176         return "void eqtestObjectGeneric() { if (null == new @RTA @RTA ArrayList<@RTB @RTB String >()); }";
177     }
178 
179     @TADescription(annotation = "RTAs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE,
180             genericLocation = {0, 0})
181     @TADescription(annotation = "RTBs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
182     public String returnNewArrayRepeatableAnnotation1() {
183         return "Object returnNewArray1() { return new @RTA @RTA String @RTB @RTB[1]; }";
184     }
185 
186     @TADescription(annotation = "RTAs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE,
187             genericLocation = {0, 0, 0, 0})
188     @TADescription(annotation = "RTBs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
189     @TADescription(annotation = "RTCs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE,
190             genericLocation = {0, 0})
191     public String returnNewArrayRepeatableAnnotation2() {
192         return "Object returnNewArray2() { return new @RTA @RTA String @RTB @RTB [1] @RTC @RTC [2]; }";
193     }
194 
195     @TADescription(annotation = "RTAs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE,
196             genericLocation = {0, 0, 0, 0})

 45     public String returnObjectGeneric() {
 46         return "Object returnObjectGeneric() { return new @TA ArrayList<@TB String>(); }";
 47     }
 48 
 49     @TADescription(annotation = "TA", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
 50     public String initObject() {
 51         return "void initObject() { Object a =  new @TA String(); }";
 52     }
 53 
 54     @TADescription(annotation = "TA", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
 55     @TADescription(annotation = "TB", type = NEW,
 56             genericLocation = { 3, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE)
 57     @TADescription(annotation = "TC", type = NEW,
 58             genericLocation = { 3, 1 }, offset = ReferenceInfoUtil.IGNORE_VALUE)
 59     public String initObjectGeneric() {
 60         return "void initObjectGeneric() { Object a = new @TA HashMap<@TB String, @TC String>(); }";
 61     }
 62 
 63     @TADescription(annotation = "TA", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
 64     public String eqtestObject() {
 65         return "void eqtestObject(String s) { if (s == new @TA String()); }";
 66     }
 67 
 68     @TADescription(annotation = "TA", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
 69     @TADescription(annotation = "TB", type = NEW,
 70             genericLocation = { 3, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE)
 71     public String eqtestObjectGeneric() {
 72         return "void eqtestObjectGeneric(ArrayList<String> as) { if (as == new @TA ArrayList<@TB String >()); }";
 73     }
 74 
 75     @TADescription(annotation = "TA", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE,
 76             genericLocation = {0, 0})
 77     @TADescription(annotation = "TB", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
 78     public String returnNewArray1() {
 79         return "Object returnNewArray1() { return new @TA String @TB[1]; }";
 80     }
 81 
 82     @TADescription(annotation = "TA", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE,
 83             genericLocation = {0, 0, 0, 0})
 84     @TADescription(annotation = "TB", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
 85     @TADescription(annotation = "TC", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE,
 86             genericLocation = {0, 0})
 87     public String returnNewArray2() {
 88         return "Object returnNewArray2() { return new @TA String @TB [1] @TC [2]; }";
 89     }
 90 
 91     @TADescription(annotation = "TA", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE,
 92             genericLocation = {0, 0, 0, 0})

149     public String returnObjectGenericRepeatableAnnotation() {
150         return "Object returnObjectGeneric() { return new @RTA @RTA ArrayList<@RTB @RTB String>(); }";
151     }
152 
153     @TADescription(annotation = "RTAs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
154     public String initObjectRepeatableAnnotation() {
155         return "void initObject() { Object a =  new @RTA @RTA String(); }";
156     }
157 
158     @TADescription(annotation = "RTAs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
159     @TADescription(annotation = "RTBs", type = NEW,
160             genericLocation = { 3, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE)
161     @TADescription(annotation = "RTCs", type = NEW,
162             genericLocation = { 3, 1 }, offset = ReferenceInfoUtil.IGNORE_VALUE)
163     public String initObjectGenericRepeatableAnnotation() {
164         return "void initObjectGeneric() { Object a = new @RTA @RTA HashMap<@RTB @RTB String, @RTC @RTC String>(); }";
165     }
166 
167     @TADescription(annotation = "RTAs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
168     public String eqtestObjectRepeatableAnnotation() {
169         return "void eqtestObject(String s) { if (s == new @RTA @RTA String()); }";
170     }
171 
172     @TADescription(annotation = "RTAs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
173     @TADescription(annotation = "RTBs", type = NEW,
174             genericLocation = { 3, 0 }, offset = ReferenceInfoUtil.IGNORE_VALUE)
175     public String eqtestObjectGenericRepeatableAnnotation() {
176         return "void eqtestObjectGeneric(ArrayList<String> as) { if (as == new @RTA @RTA ArrayList<@RTB @RTB String >()); }";
177     }
178 
179     @TADescription(annotation = "RTAs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE,
180             genericLocation = {0, 0})
181     @TADescription(annotation = "RTBs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
182     public String returnNewArrayRepeatableAnnotation1() {
183         return "Object returnNewArray1() { return new @RTA @RTA String @RTB @RTB[1]; }";
184     }
185 
186     @TADescription(annotation = "RTAs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE,
187             genericLocation = {0, 0, 0, 0})
188     @TADescription(annotation = "RTBs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE)
189     @TADescription(annotation = "RTCs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE,
190             genericLocation = {0, 0})
191     public String returnNewArrayRepeatableAnnotation2() {
192         return "Object returnNewArray2() { return new @RTA @RTA String @RTB @RTB [1] @RTC @RTC [2]; }";
193     }
194 
195     @TADescription(annotation = "RTAs", type = NEW, offset = ReferenceInfoUtil.IGNORE_VALUE,
196             genericLocation = {0, 0, 0, 0})
< prev index next >