• Home
  • Raw
  • Download

Lines Matching refs:New

7  * New: Add support for explicit receiver parameters.
20 * New: Add `JavaFile.writeToPath()` and `JavaFile.writeToFile()` methods that return paths to the
22 * New: Add `TypeSpec.alwaysQualify()` API to avoid clashes involving nested type names.
23 * New: Add overloads accepting `CodeBlock`s to `MethodSpec`'s control flow methods.
24 * New: Make list fields of all `Builder` types mutable.
25 * New: Add `CodeBlock.clear()`.
26 * New: Allow passing a custom `Charset` to `JavaFile.writeTo()`.
27 * New: Improved performance of `ClassName.simpleNames()` by memoizing results.
28 * New: Significant performance improvements for `CodeWriter.resolve()` as all nested simple names
30 * New: Add `TypeName.Builder.setName()` to allow overriding names passed in the constructor.
31 * New: Add `TypeName.canonicalName()`.
52 * New: Support `TYPE_USE` annotations on each enclosing `ClassName`.
53 * New: Work around a compiler bug in `TypeName.get(TypeElement)`. There was a problem getting an
61 * New: `$Z` as an optional newline (zero-width space) if a line may exceed 100 chars.
62 * New: `CodeBlock.join()` and `CodeBlock.joining()` let you join codeblocks by delimiters.
63 * New: Add `CodeBlock.Builder.isEmpty()`.
64 * New: `addStatement(CodeBlock)` overloads for `CodeBlock` and `MethodSpec`.
76 * New: `MethodSpec.Builder.addNamedCode()` and `TypeSpec.anonymousClassBuilder(CodeBlock)`.
82 * New: Basic support for line wrapping. Use `$W` to insert a Wrappable Whitespace character. It'll
84 * New: Named arguments in `CodeBlock`. These are intended to make larger code snippets easier to
102 * New: `addJavadoc(CodeBlock)` overloads for TypeSpec, MethodSpec, and FieldSpec.
103 * New: `MethodSpec.addComment()` makes it easy to add a `// single-line comment.`
104 * New: `ClassName.getReflectionName()` returns a string like `java.util.Map$Entry`.
113 * New: Support parameterized types that enclose other types, like `Outer<String>.Inner`.
114 * New: `TypeName.isBoxedPrimitive()`.
127 * New: Revive `CodeBlock.of()`, a handy factory method for building code blocks.
128 * New: Add `TypeSpec` factory methods that take a `ClassName`.
129 * New: `TypeName.annotated()` adds an annotation to a type.
130 * New: `TypeVariableName.withBounds()` adds bounds to a type variable.
131 * New: `TypeSpec.Builder.addInitializerBlock()` adds an instance initializer.
149 * New: `import static`! See `JavaFile.Builder.addStaticImport()` variants.
150 * New: Overload `NameAllocator.newName(String)` for creating a one-off name without a tag.
160 * New: `AnnotationSpec.get(Annotation)`.
161 * New: Type annotations! `TypeName.annotated()` can attach annotations like `@Nullable` directly to
163 * New: `equals()` and `hashCode()` on `AnnotationSpec`, `CodeBlock`, `FieldSpec`, `JavaFile`,
165 * New: `NameAllocator.clone()` to refine a NameAllocator for use in an inner scope code block.
174 * New: `NameAllocator` API makes it easy to declare non-conflicting names.
175 * New: Support annotations on enum values.
184 * New: Arguments may have positional indexes like `$1T` and `$2N`. Indexes can be used to refer to
186 * New: Permit Javadoc on enum constants.
187 * New: Class initializer blocks with `addStaticBlock()`.
194 * New: Eager validation of argument types like `$T` and `$N`.
195 * New: `MethodSpec.varargs(boolean)` to generate varags methods.
196 * New: `AnnotationSpec.get()` and `MethodSpec.overriding()` to create annotations and methods from
198 * New: `JavaFile.toJavaFileObject()`.
199 * New: Java 8 `DEFAULT` modifier.
200 * New: `toBuilder()` methods to build upon objects already constructed.
201 * New: Generate `@interface` annotation types.
202 * New: `TypeName.box()` and `TypeName.unbox()` convenience APIs.
222 * New: `StringLiteral` type which encapsulates the behavior of `stringLiteral`.
231 * New: Methods in interfaces will always have no body declaration.
232 * New: Control flow begin declaration now supports String format arguments.
240 * New: Properly indent hanging lines in field initializers.
241 * New: `emitEnumValue` variant which exposes a boolean of whether the current value is the last.
253 * New: Configurable indent level via `setIndent`.
254 * New: `beginConstructor` method is a semantically clearer alternative for constructors.
255 * New: `emitEnumValues` method emits a list of values followed by semicolon.
287 * New: All methods now take a `Set` of `Modifier`s rather than an `int`. The `int` methods are