final class FactoryWriter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static com.google.common.base.Joiner |
argumentJoiner |
private javax.annotation.processing.Filer |
filer |
Constructor and Description |
---|
FactoryWriter(javax.annotation.processing.Filer filer) |
Modifier and Type | Method and Description |
---|---|
private static com.squareup.javapoet.TypeName |
annotateIfPresent(com.squareup.javapoet.TypeName typeName,
com.google.common.base.Optional<javax.lang.model.element.AnnotationMirror> annotation) |
private static java.lang.String |
getPackage(java.lang.CharSequence fullyQualifiedName) |
private static java.lang.CharSequence |
getSimpleName(java.lang.CharSequence fullyQualifiedName) |
private static int |
lastIndexOf(java.lang.CharSequence charSequence,
char c) |
private static java.lang.Iterable<com.squareup.javapoet.ParameterSpec> |
parameters(java.lang.Iterable<Parameter> parameters) |
private static com.squareup.javapoet.TypeName |
typeName(javax.lang.model.type.TypeMirror type)
JavaPoet 1.5.1 does not handle
ErrorType in TypeName.get(TypeMirror) . |
(package private) void |
writeFactory(FactoryDescriptor descriptor) |
private final javax.annotation.processing.Filer filer
private static final com.google.common.base.Joiner argumentJoiner
void writeFactory(FactoryDescriptor descriptor) throws java.io.IOException
java.io.IOException
private static java.lang.Iterable<com.squareup.javapoet.ParameterSpec> parameters(java.lang.Iterable<Parameter> parameters)
private static java.lang.CharSequence getSimpleName(java.lang.CharSequence fullyQualifiedName)
private static java.lang.String getPackage(java.lang.CharSequence fullyQualifiedName)
private static int lastIndexOf(java.lang.CharSequence charSequence, char c)
private static com.squareup.javapoet.TypeName annotateIfPresent(com.squareup.javapoet.TypeName typeName, com.google.common.base.Optional<javax.lang.model.element.AnnotationMirror> annotation)
private static com.squareup.javapoet.TypeName typeName(javax.lang.model.type.TypeMirror type)
ErrorType
in TypeName.get(TypeMirror)
. A fix is
proposed in https://github.com/square/javapoet/pull/430.