Home
last modified time | relevance | path

Searched refs:classBuilder (Results 1 – 25 of 71) sorted by relevance

123

/external/connectedappssdk/processor/src/main/java/com/google/android/enterprise/connectedapps/processor/
DFakeCrossProfileTypeGenerator.java79 TypeSpec.Builder classBuilder = in generateFakeCrossProfileType() local
80 TypeSpec.classBuilder(className) in generateFakeCrossProfileType()
92 classBuilder.addField( in generateFakeCrossProfileType()
97 addConstructor(classBuilder); in generateFakeCrossProfileType()
99 classBuilder.addMethod( in generateFakeCrossProfileType()
106 classBuilder.addMethod( in generateFakeCrossProfileType()
124 classBuilder.addMethod( in generateFakeCrossProfileType()
136 addPersonalMethod(classBuilder); in generateFakeCrossProfileType()
137 addWorkMethod(classBuilder); in generateFakeCrossProfileType()
139 classBuilder.addMethod( in generateFakeCrossProfileType()
[all …]
DDefaultProfileClassGenerator.java89 TypeSpec.Builder classBuilder = in generateDefaultProfileClass() local
90 TypeSpec.classBuilder(className) in generateDefaultProfileClass()
96 classBuilder.addSuperinterface(crossProfileTypeInterfaceClassName); in generateDefaultProfileClass()
98 classBuilder.addField( in generateDefaultProfileClass()
103 classBuilder.addMethod( in generateDefaultProfileClass()
110 addCurrentMethod(classBuilder); in generateDefaultProfileClass()
112 classBuilder.addMethod( in generateDefaultProfileClass()
128 classBuilder.addMethod( in generateDefaultProfileClass()
142 classBuilder.addMethod( in generateDefaultProfileClass()
156 classBuilder.addMethod( in generateDefaultProfileClass()
[all …]
DCrossProfileCallbackCodeGenerator.java117 TypeSpec.Builder classBuilder = in generateMultiMergerResultClass() local
118 TypeSpec.classBuilder(className) in generateMultiMergerResultClass()
127 classBuilder.addField( in generateMultiMergerResultClass()
134 classBuilder.addMethod( in generateMultiMergerResultClass()
145 classBuilder.addMethod( in generateMultiMergerResultClass()
153 generatorUtilities.writeClassToFile(className.packageName(), classBuilder); in generateMultiMergerResultClass() local
163 TypeSpec.Builder classBuilder = in generateMultiMergerInputClass() local
164 TypeSpec.classBuilder(className) in generateMultiMergerInputClass()
173 classBuilder.addField( in generateMultiMergerInputClass()
178 classBuilder.addField( in generateMultiMergerInputClass()
[all …]
DInternalCrossProfileClassGenerator.java89 TypeSpec.Builder classBuilder = in generateInternalCrossProfileClass() local
90 TypeSpec.classBuilder(className).addModifiers(Modifier.PUBLIC, Modifier.FINAL); in generateInternalCrossProfileClass()
92 classBuilder.addJavadoc( in generateInternalCrossProfileClass()
99 classBuilder.addField( in generateInternalCrossProfileClass()
105 classBuilder.addField( in generateInternalCrossProfileClass()
120 classBuilder.addMethod( in generateInternalCrossProfileClass()
132 classBuilder.addMethod( in generateInternalCrossProfileClass()
138 classBuilder.addMethod( in generateInternalCrossProfileClass()
145 classBuilder.addMethod(MethodSpec.constructorBuilder().addModifiers(Modifier.PRIVATE).build()); in generateInternalCrossProfileClass()
147 addMethodsField(classBuilder, crossProfileType); in generateInternalCrossProfileClass()
[all …]
DCurrentProfileGenerator.java75 TypeSpec.Builder classBuilder = in generateCurrentProfileClass() local
76 TypeSpec.classBuilder(className) in generateCurrentProfileClass()
88 addCrossProfileConstructor(classBuilder); in generateCurrentProfileClass()
91 generateMethodOnCurrentProfileClass(classBuilder, method, crossProfileType); in generateCurrentProfileClass()
97 classBuilder, method, crossProfileType); in generateCurrentProfileClass()
101 classBuilder.addMethod( in generateCurrentProfileClass()
117 classBuilder.addMethod( in generateCurrentProfileClass()
125 generatorUtilities.writeClassToFile(className.packageName(), classBuilder); in generateCurrentProfileClass() local
128 private void addCrossProfileConstructor(TypeSpec.Builder classBuilder) { in addCrossProfileConstructor() argument
129 classBuilder.addField( in addCrossProfileConstructor()
[all …]
DUserConnectorCodeGenerator.java71 TypeSpec.Builder classBuilder = in generateUserConnector() local
72 TypeSpec.classBuilder(className) in generateUserConnector()
82 classBuilder.addMethod( in generateUserConnector()
90 classBuilder.addMethod( in generateUserConnector()
98 generateUserConnectorBuilder(classBuilder); in generateUserConnector()
100 generatorUtilities.writeClassToFile(className.packageName(), classBuilder); in generateUserConnector() local
108 TypeSpec.Builder classBuilder = in generateUserConnectorBuilder() local
109 TypeSpec.classBuilder(builderClassName) in generateUserConnectorBuilder()
121 classBuilder.addMethod( in generateUserConnectorBuilder()
127 classBuilder.addField( in generateUserConnectorBuilder()
[all …]
DServiceGenerator.java74 TypeSpec.Builder classBuilder = in generateServiceClass() local
75 TypeSpec.classBuilder(className) in generateServiceClass()
88 addBinder(classBuilder); in generateServiceClass()
90 classBuilder.addMethod( in generateServiceClass()
99 generatorUtilities.writeClassToFile(className.packageName(), classBuilder); in generateServiceClass() local
102 private void addBinder(TypeSpec.Builder classBuilder) { in addBinder() argument
118 classBuilder.addField( in addBinder()
124 private static void addPrepareCallMethod(TypeSpec.Builder classBuilder) { in addPrepareCallMethod() argument
137 classBuilder.addMethod(prepareCallMethod); in addPrepareCallMethod()
140 private static void addCallMethod(TypeSpec.Builder classBuilder) { in addCallMethod() argument
[all …]
DAlwaysThrowsGenerator.java73 TypeSpec.Builder classBuilder = in generateAlwaysThrowsClass() local
74 TypeSpec.classBuilder(className) in generateAlwaysThrowsClass()
82 classBuilder.addField(String.class, "errorMessage", Modifier.PRIVATE, Modifier.FINAL); in generateAlwaysThrowsClass()
84 classBuilder.addMethod( in generateAlwaysThrowsClass()
94 classBuilder.addMethod( in generateAlwaysThrowsClass()
110 classBuilder.addMethod( in generateAlwaysThrowsClass()
120 generateBlockingMethodOnAlwaysThrowsClass(classBuilder, method, crossProfileType); in generateAlwaysThrowsClass()
123 classBuilder, method, crossProfileType); in generateAlwaysThrowsClass()
125 generateFutureMethodOnAlwaysThrowsClass(classBuilder, method, crossProfileType); in generateAlwaysThrowsClass()
131 generatorUtilities.writeClassToFile(className.packageName(), classBuilder); in generateAlwaysThrowsClass() local
[all …]
DProfileConnectorCodeGenerator.java72 TypeSpec.Builder classBuilder = in generateProfileConnector() local
73 TypeSpec.classBuilder(className) in generateProfileConnector()
83 classBuilder.addMethod( in generateProfileConnector()
91 classBuilder.addMethod( in generateProfileConnector()
99 generateProfileConnectorBuilder(classBuilder); in generateProfileConnector()
101 generatorUtilities.writeClassToFile(className.packageName(), classBuilder); in generateProfileConnector() local
110 TypeSpec.Builder classBuilder = in generateProfileConnectorBuilder() local
111 TypeSpec.classBuilder(builderClassName) in generateProfileConnectorBuilder()
132 classBuilder.addMethod( in generateProfileConnectorBuilder()
138 classBuilder.addField( in generateProfileConnectorBuilder()
[all …]
DBundlerGenerator.java73 TypeSpec.Builder classBuilder = in generateBundlerClass() local
74 TypeSpec.classBuilder(className) in generateBundlerClass()
82 classBuilder.addMethod(MethodSpec.constructorBuilder().addModifiers(Modifier.PUBLIC).build()); in generateBundlerClass()
83 classBuilder.addMethod( in generateBundlerClass()
89 makeParcelable(classBuilder, className); in generateBundlerClass()
90 addWriteToParcelMethod(classBuilder); in generateBundlerClass()
91 addReadFromParcelMethod(classBuilder); in generateBundlerClass()
92 addCreateArrayMethod(classBuilder); in generateBundlerClass()
94 generatorUtilities.writeClassToFile(className.packageName(), classBuilder); in generateBundlerClass() local
97 private void makeParcelable(TypeSpec.Builder classBuilder, ClassName bundlerClassName) { in makeParcelable() argument
[all …]
DFakeOtherGenerator.java82 TypeSpec.Builder classBuilder = in generateFakeOther() local
83 TypeSpec.classBuilder(className) in generateFakeOther()
93 classBuilder.addField( in generateFakeOther()
96 addConstructor(classBuilder); in generateFakeOther()
98 classBuilder.addMethod( in generateFakeOther()
114 classBuilder.addMethod( in generateFakeOther()
124 generateBlockingMethodOnFakeOther(classBuilder, method, crossProfileType); in generateFakeOther()
126 generateCrossProfileCallbackMethodOnFakeOther(classBuilder, method, crossProfileType); in generateFakeOther()
128 generateFutureMethodOnFakeOther(classBuilder, method, crossProfileType); in generateFakeOther()
134 generatorUtilities.writeClassToFile(className.packageName(), classBuilder); in generateFakeOther() local
[all …]
DInternalProviderClassGenerator.java67 TypeSpec.Builder classBuilder = in generateInternalProviderClassClass() local
68 TypeSpec.classBuilder(className).addModifiers(Modifier.PUBLIC, Modifier.FINAL); in generateInternalProviderClassClass()
70 classBuilder.addJavadoc( in generateInternalProviderClassClass()
74 classBuilder.addField( in generateInternalProviderClassClass()
80 classBuilder.addField( in generateInternalProviderClassClass()
85 classBuilder.addMethod( in generateInternalProviderClassClass()
98 classBuilder.addMethod( in generateInternalProviderClassClass()
104 classBuilder.addMethod( in generateInternalProviderClassClass()
130 addCallMethod(classBuilder); in generateInternalProviderClassClass()
132 generatorUtilities.writeClassToFile(className.packageName(), classBuilder); in generateInternalProviderClassClass() local
[all …]
DProtoParcelableWrapperGenerator.java78 TypeSpec.Builder classBuilder = in generateProtoParcelableWrapper() local
79 TypeSpec.classBuilder(wrapperClassName) in generateProtoParcelableWrapper()
88 classBuilder.addField( in generateProtoParcelableWrapper()
92 classBuilder.addField( in generateProtoParcelableWrapper()
98 classBuilder.addMethod( in generateProtoParcelableWrapper()
111 classBuilder.addMethod( in generateProtoParcelableWrapper()
118 classBuilder.addMethod( in generateProtoParcelableWrapper()
127 classBuilder.addMethod( in generateProtoParcelableWrapper()
145 classBuilder.addMethod( in generateProtoParcelableWrapper()
161 classBuilder, parcelableWrapper.wrapperClassName()); in generateProtoParcelableWrapper()
[all …]
DDispatcherGenerator.java79 TypeSpec.Builder classBuilder = in generateDispatcherClass() local
80 TypeSpec.classBuilder(className) in generateDispatcherClass()
89 classBuilder.addField( in generateDispatcherClass()
95 addCallMethod(classBuilder); in generateDispatcherClass()
96 addPrepareCallMethod(classBuilder); in generateDispatcherClass()
97 addFetchResponseMethod(classBuilder); in generateDispatcherClass()
99 generatorUtilities.writeClassToFile(className.packageName(), classBuilder); in generateDispatcherClass() local
102 private static void addPrepareCallMethod(TypeSpec.Builder classBuilder) { in addPrepareCallMethod() argument
132 classBuilder.addMethod(prepareCallMethod); in addPrepareCallMethod()
135 private static void addFetchResponseMethod(TypeSpec.Builder classBuilder) { in addFetchResponseMethod() argument
[all …]
DOtherProfileGenerator.java80 TypeSpec.Builder classBuilder = in generateOtherProfileClass() local
81 TypeSpec.classBuilder(className) in generateOtherProfileClass()
93 classBuilder.addField(connectorClassName, "connector", Modifier.PRIVATE, Modifier.FINAL); in generateOtherProfileClass()
95 classBuilder.addMethod( in generateOtherProfileClass()
105 classBuilder.addField( in generateOtherProfileClass()
115 classBuilder.addMethod( in generateOtherProfileClass()
132 classBuilder.addMethod( in generateOtherProfileClass()
142 generateBlockingMethodOnOtherProfileClass(classBuilder, method, crossProfileType); in generateOtherProfileClass()
145 classBuilder, method, crossProfileType); in generateOtherProfileClass()
147 generateFutureMethodOnOtherProfileClass(classBuilder, method, crossProfileType); in generateOtherProfileClass()
[all …]
DMultipleProfilesGenerator.java87 TypeSpec.Builder classBuilder = in generateMultipleProfilesClass() local
88 TypeSpec.classBuilder(className) in generateMultipleProfilesClass()
102 classBuilder.addField(senderMapType, "senders", Modifier.PRIVATE, Modifier.FINAL); in generateMultipleProfilesClass()
104 classBuilder.addMethod( in generateMultipleProfilesClass()
111 classBuilder.addMethod( in generateMultipleProfilesClass()
129 generateBlockingMethodOnMultipleProfilesClass(classBuilder, method, crossProfileType); in generateMultipleProfilesClass()
132 classBuilder, method, crossProfileType); in generateMultipleProfilesClass()
134 generateFutureMethodOnMultipleProfilesClass(classBuilder, method, crossProfileType); in generateMultipleProfilesClass()
140 generatorUtilities.writeClassToFile(className.packageName(), classBuilder); in generateMultipleProfilesClass() local
144 TypeSpec.Builder classBuilder, in generateBlockingMethodOnMultipleProfilesClass() argument
[all …]
DFakeProfileConnectorGenerator.java54 TypeSpec.Builder classBuilder = in generateFakeProfileConnector() local
55 TypeSpec.classBuilder(className) in generateFakeProfileConnector()
68 classBuilder.addMethod( in generateFakeProfileConnector()
75 classBuilder.addMethod( in generateFakeProfileConnector()
83 classBuilder.addMethod( in generateFakeProfileConnector()
92 generatorUtilities.writeClassToFile(className.packageName(), classBuilder); in generateFakeProfileConnector() local
DIfAvailableGenerator.java72 TypeSpec.Builder classBuilder = in generateIfAvailableClass() local
73 TypeSpec.classBuilder(className) in generateIfAvailableClass()
80 classBuilder.addField( in generateIfAvailableClass()
85 classBuilder.addMethod( in generateIfAvailableClass()
93 generateMethodOnIfAvailableClass(classBuilder, method, crossProfileType); in generateIfAvailableClass()
96 generatorUtilities.writeClassToFile(className.packageName(), classBuilder); in generateIfAvailableClass() local
100 TypeSpec.Builder classBuilder, in generateMethodOnIfAvailableClass() argument
224 classBuilder.addMethod(methodBuilder.build()); in generateMethodOnIfAvailableClass()
/external/javapoet/src/test/java/com/squareup/javapoet/
DJavaFileTest.java61 TypeSpec hello = TypeSpec.classBuilder("HelloWorld") in importStaticReadmeExample()
94 TypeSpec.classBuilder("Taco") in importStaticForCrazyFormatsWorks()
117 TypeSpec.classBuilder("Taco") in importStaticMixed()
156 TypeSpec.classBuilder("Taco") in importStaticDynamic()
256 return TypeSpec.classBuilder(name).addMethod(method).build(); in importStaticTypeSpec()
261 TypeSpec.classBuilder("Taco").build()) in noImports()
273 TypeSpec.classBuilder("Taco") in singleImport()
290 TypeSpec.classBuilder("Taco") in conflictingImports()
310 TypeSpec.classBuilder("Taco") in annotatedTypeParam()
332 TypeSpec.classBuilder("Taco") in skipJavaLangImportsWithConflictingClassLast()
[all …]
DTypeSpecTest.java61 TypeSpec taco = TypeSpec.classBuilder("Taco") in basic()
91 TypeSpec taco = TypeSpec.classBuilder("Taco") in interestingTypes()
145 TypeSpec taco = TypeSpec.classBuilder("Taco") in anonymousInnerClass()
173 TypeSpec service = TypeSpec.classBuilder("Foo") in annotatedParameters()
214 TypeSpec taco = TypeSpec.classBuilder("EthicalTaco") in annotationsAndJavaLangTypes()
289 TypeSpec taco = TypeSpec.classBuilder("Taco") in annotatedField()
309 TypeSpec taco = TypeSpec.classBuilder("Foo") in annotatedClass()
331 TypeSpec.classBuilder("Foo").addAnnotation((AnnotationSpec) null); in addAnnotationDisallowsNull()
337 TypeSpec.classBuilder("Foo").addAnnotation((ClassName) null); in addAnnotationDisallowsNull()
343 TypeSpec.classBuilder("Foo").addAnnotation((Class<?>) null); in addAnnotationDisallowsNull()
[all …]
DFileWritingTest.java52 TypeSpec type = TypeSpec.classBuilder("Test").build(); in pathNotDirectory()
66 TypeSpec type = TypeSpec.classBuilder("Test").build(); in fileNotDirectory()
80 TypeSpec type = TypeSpec.classBuilder("Test").build(); in pathDefaultPackage()
88 TypeSpec type = TypeSpec.classBuilder("Test").build(); in fileDefaultPackage()
96 TypeSpec type = TypeSpec.classBuilder("Test").build(); in filerDefaultPackage()
104 TypeSpec type = TypeSpec.classBuilder("Test").build(); in pathNestedClasses()
118 TypeSpec type = TypeSpec.classBuilder("Test").build(); in fileNestedClasses()
135 TypeSpec type = TypeSpec.classBuilder("Test").build(); in filerNestedClasses()
150 TypeSpec test1 = TypeSpec.classBuilder("Test1") in filerPassesOriginatingElements()
156 TypeSpec test2 = TypeSpec.classBuilder("Test2") in filerPassesOriginatingElements()
[all …]
DFileReadingTest.java49 TypeSpec type = TypeSpec.classBuilder("Test").build(); in javaFileObjectUri()
59 JavaFile javaFile = JavaFile.builder("", TypeSpec.classBuilder("Test").build()).build(); in javaFileObjectKind()
64 TypeSpec type = TypeSpec.classBuilder("Test") in javaFileObjectCharacterContent()
77 JavaFile javaFile = JavaFile.builder("foo", TypeSpec.classBuilder("Test").build()) in javaFileObjectInputStreamIsUtf8()
88 TypeSpec type = TypeSpec.classBuilder("Test") in compileJavaFile()
DAnnotationSpecTest.java125 TypeSpec taco = TypeSpec.classBuilder("Taco") in defaultAnnotation()
161 TypeSpec.Builder typeBuilder = TypeSpec.classBuilder(IsAnnotated.class.getSimpleName()); in defaultAnnotationWithImport()
267 TypeSpec taco = TypeSpec.classBuilder("Taco") in reflectAnnotation()
301 TypeSpec taco = TypeSpec.classBuilder("Taco") in reflectAnnotationWithDefaults()
/external/dagger2/java/dagger/internal/codegen/componentgenerator/
DComponentCreatorImplementationFactory.java25 import static com.squareup.javapoet.TypeSpec.classBuilder;
110 final TypeSpec.Builder classBuilder; field in ComponentCreatorImplementationFactory.Builder
117 this.classBuilder = classBuilder(className); in Builder()
128 return ComponentCreatorImplementation.create(classBuilder.build(), className, fields); in build()
170 visibility().ifPresent(classBuilder::addModifiers); in setModifiers()
172 classBuilder.addModifiers(STATIC); in setModifiers()
174 classBuilder.addModifiers(FINAL); in setModifiers()
198 classBuilder.addFields(result.values()); in addFields()
206 createSetterMethod(requirement, status).ifPresent(classBuilder::addMethod)); in addSetterMethods()
281 classBuilder.addMethod(factoryMethod()); in addFactoryMethod()
[all …]
/external/dagger2/java/dagger/grpc/server/processor/
DUnscopedGrpcServiceModuleGenerator.java22 import static com.squareup.javapoet.TypeSpec.classBuilder;
53 classBuilder(grpcServiceModel.unscopedServiceModuleName) in createType()
75 return TypeSpec.classBuilder(simpleName) in unscopedComponentFactory()

123