Lines Matching refs:addStatement
32 .addStatement("$T.out.println($S)", System.class, "Hello, JavaPoet!")
87 make it easier. There's `addStatement()` which takes care of semicolons and newline, and
93 .addStatement("int total = 0")
95 .addStatement("total += i")
107 .addStatement("int result = 1")
109 .addStatement("result = result " + op + " i")
111 .addStatement("return result")
134 The string-concatenation in calls to `beginControlFlow()` and `addStatement` is distracting. Too
143 .addStatement("int result = 0")
145 .addStatement("result = result $L i", op)
147 .addStatement("return result")
179 .addStatement("return $S", name)
211 .addStatement("return new $T()", Date.class)
248 .addStatement("return new $T()", hoverboard)
279 .addStatement("$T result = new $T<>()", listOfHoverboards, arrayList)
280 .addStatement("result.add(new $T())", hoverboard)
281 .addStatement("result.add(new $T())", hoverboard)
282 .addStatement("result.add(new $T())", hoverboard)
283 .addStatement("return result")
318 .addStatement("$T result = new $T<>()", listOfHoverboards, arrayList)
319 .addStatement("result.add($T.createNimbus(2000))", hoverboard)
320 .addStatement("result.add($T.createNimbus(\"2001\"))", hoverboard)
321 .addStatement("result.add($T.createNimbus($T.THUNDERBOLT))", hoverboard, namedBoards)
322 .addStatement("$T.sort(result)", Collections.class)
323 .addStatement("return result.isEmpty() ? $T.emptyList() : result", Collections.class)
388 .addStatement("return (char) (i < 10 ? i + '0' : i - 10 + 'a')")
394 .addStatement("char[] result = new char[2]")
395 .addStatement("result[0] = $N((b >>> 4) & 0xf)", hexDigit)
396 .addStatement("result[1] = $N(b & 0xf)", hexDigit)
397 .addStatement("return new String(result)")
477 .addStatement("this.$N = $N", "greeting", "greeting")
636 .addStatement("return $S", "avalanche!")
647 .addStatement("this.$N = $N", "handsign", "handsign")
689 .addStatement("return $N.length() - $N.length()", "a", "b")
696 .addStatement("$T.sort($N, $L)", Collections.class, "strings", comparator)
729 .addStatement("return $S", "Hoverboard")