Home
last modified time | relevance | path

Searched refs:ClassName (Results 1 – 25 of 204) sorted by relevance

123456789

/external/javapoet/src/test/java/com/squareup/javapoet/
DClassNameTest.java38 assertThat(ClassName.bestGuess(String.class.getName())) in bestGuessForString_simpleClass()
39 .isEqualTo(ClassName.get("java.lang", "String")); in bestGuessForString_simpleClass()
43 ClassName className = ClassName.bestGuess( in bestGuessNonAscii()
54 assertThat(ClassName.bestGuess(Map.Entry.class.getCanonicalName())) in bestGuessForString_nestedClass()
55 .isEqualTo(ClassName.get("java.util", "Map", "Entry")); in bestGuessForString_nestedClass()
56 assertThat(ClassName.bestGuess(OuterClass.InnerClass.class.getCanonicalName())) in bestGuessForString_nestedClass()
57 .isEqualTo(ClassName.get("com.squareup.javapoet", in bestGuessForString_nestedClass()
62 assertThat(ClassName.bestGuess("SomeClass")) in bestGuessForString_defaultPackage()
63 .isEqualTo(ClassName.get("", "SomeClass")); in bestGuessForString_defaultPackage()
64 assertThat(ClassName.bestGuess("SomeClass.Nested")) in bestGuessForString_defaultPackage()
[all …]
DJavaFileTest.java33 ClassName hoverboard = ClassName.get("com.mattel", "Hoverboard"); in importStaticReadmeExample()
34 ClassName namedBoards = ClassName.get("com.mattel", "Hoverboard", "Boards"); in importStaticReadmeExample()
35 ClassName list = ClassName.get("java.util", "List"); in importStaticReadmeExample()
36 ClassName arrayList = ClassName.get("java.util", "ArrayList"); in importStaticReadmeExample()
278 .addField(ClassName.get("java.sql", "Date"), "madeFreshDatabaseDate") in conflictingImports()
297 .addField(ParameterizedTypeName.get(ClassName.get(List.class), in annotatedTypeParam()
298 ClassName.get("com.squareup.meat", "Chorizo") in annotatedTypeParam()
299 .annotated(AnnotationSpec.builder(ClassName.get("com.squareup.tacos", "Spicy")) in annotatedTypeParam()
319 .addField(ClassName.get("java.lang", "Float"), "litres") in skipJavaLangImportsWithConflictingClassLast()
320 .addField(ClassName.get("com.squareup.soda", "Float"), "beverage") in skipJavaLangImportsWithConflictingClassLast()
[all …]
DTypeSpecTest.java85 ClassName.get(List.class), WildcardTypeName.subtypeOf(Object.class)); in interestingTypes()
87 ClassName.get(List.class), WildcardTypeName.subtypeOf(Serializable.class)); in interestingTypes()
88 TypeName listOfSuper = ParameterizedTypeName.get(ClassName.get(List.class), in interestingTypes()
112 ClassName foo = ClassName.get(tacosPackage, "Foo"); in anonymousInnerClass()
113 ClassName bar = ClassName.get(tacosPackage, "Bar"); in anonymousInnerClass()
114 ClassName thingThang = ClassName.get(tacosPackage, "Thing", "Thang"); in anonymousInnerClass()
116 ClassName thung = ClassName.get(tacosPackage, "Thung"); in anonymousInnerClass()
117 ClassName simpleThung = ClassName.get(tacosPackage, "SimpleThung"); in anonymousInnerClass()
177 .addAnnotation(ClassName.get(tacosPackage, "Ping")) in annotatedParameters()
180 .addAnnotation(ClassName.get(tacosPackage, "Ping")) in annotatedParameters()
[all …]
DAbstractTypesTest.java66 .isEqualTo(ClassName.get(Object.class)); in getBasicTypeMirror()
68 .isEqualTo(ClassName.get(Charset.class)); in getBasicTypeMirror()
70 .isEqualTo(ClassName.get(AbstractTypesTest.class)); in getBasicTypeMirror()
77 .isEqualTo(ParameterizedTypeName.get(ClassName.get(Set.class), ClassName.OBJECT)); in getParameterizedTypeMirror()
100 assertThat(TypeName.get(topLevel)).isEqualTo(ClassName.get("", "Tacos")); in errorTypes()
101 assertThat(TypeName.get(member)).isEqualTo(ClassName.get("Ingredients", "Guacamole")); in errorTypes()
127 ClassName number = ClassName.get(Number.class); in getTypeVariableTypeMirror()
128 ClassName runnable = ClassName.get(Runnable.class); in getTypeVariableTypeMirror()
129 ClassName serializable = ClassName.get(Serializable.class); in getTypeVariableTypeMirror()
190 .isEqualTo(ArrayTypeName.of(ClassName.OBJECT)); in getArrayTypeMirror()
[all …]
DTypeNameTest.java130 assertEqualsHashCodeAndToString(ClassName.get(Object.class), ClassName.get(Object.class)); in equalsAndHashCodeClassName()
131 assertEqualsHashCodeAndToString(TypeName.get(Object.class), ClassName.get(Object.class)); in equalsAndHashCodeClassName()
132 assertEqualsHashCodeAndToString(ClassName.bestGuess("java.lang.Object"), in equalsAndHashCodeClassName()
133 ClassName.get(Object.class)); in equalsAndHashCodeClassName()
141 assertNotEquals(ClassName.get(List.class), ParameterizedTypeName.get(List.class, in equalsAndHashCodeParameterizedTypeName()
164 assertThat(ClassName.get("java.lang", "Integer").isPrimitive()).isFalse(); in isPrimitive()
165 assertThat(ClassName.get("java.lang", "String").isPrimitive()).isFalse(); in isPrimitive()
167 assertThat(ClassName.get("java.lang", "Void").isPrimitive()).isFalse(); in isPrimitive()
172 assertThat(ClassName.get("java.lang", "Integer").isBoxedPrimitive()).isTrue(); in isBoxedPrimitive()
173 assertThat(ClassName.get("java.lang", "String").isBoxedPrimitive()).isFalse(); in isBoxedPrimitive()
[all …]
DAnnotatedTypeNameTest.java86 TypeName actual = ParameterizedTypeName.get(ClassName.get(List.class), type); in annotatedArgumentOfParameterizedType()
105 annotatedEquivalence(ClassName.get(Object.class)); in annotatedEquivalence()
129 TypeName type = ((ClassName) TypeName.get(Map.class).annotated(TYPE_USE_ANNOTATION)) in annotatedEnclosingAndNestedType()
143 TypeName type = ((ClassName) TypeName.get(Map.class).annotated(TYPE_USE_ANNOTATION)) in withoutAnnotationsOnAnnotatedEnclosingAndNestedType()
150 TypeName type = ((ClassName) TypeName.get(Map.class).annotated(TYPE_USE_ANNOTATION)) in withoutAnnotationsOnAnnotatedEnclosingType()
157 TypeName type = ((ClassName) TypeName.get(Map.class)) in withoutAnnotationsOnAnnotatedNestedType()
165 TypeName type = ArrayTypeName.of(ClassName.get(Object.class)).annotated(TYPE_USE_ANNOTATION); in annotatedArrayType()
170 TypeName type = ArrayTypeName.of(ClassName.get(Object.class).annotated(TYPE_USE_ANNOTATION)); in annotatedArrayElementType()
176 TypeName type = ArrayTypeName.of(ArrayTypeName.of(ClassName.get(Object.class))) in annotatedOuterMultidimensionalArrayType()
183 TypeName type = ArrayTypeName.of(ArrayTypeName.of(ClassName.get(Object.class)) in annotatedInnerMultidimensionalArrayType()
[all …]
/external/dagger2/compiler/src/test/java/dagger/internal/codegen/writer/
DClassNameTest.java37 assertThat(ClassName.bestGuessFromString(String.class.getName())) in bestGuessForString_simpleClass()
38 .isEqualTo(ClassName.create("java.lang", "String")); in bestGuessForString_simpleClass()
46 assertThat(ClassName.bestGuessFromString(Map.Entry.class.getCanonicalName())) in bestGuessForString_nestedClass()
47 .isEqualTo(ClassName.create("java.util", ImmutableList.of("Map"), "Entry")); in bestGuessForString_nestedClass()
48 assertThat(ClassName.bestGuessFromString(OuterClass.InnerClass.class.getCanonicalName())) in bestGuessForString_nestedClass()
50 ClassName.create("dagger.internal.codegen.writer", in bestGuessForString_nestedClass()
55 assertThat(ClassName.bestGuessFromString("SomeClass")) in bestGuessForString_defaultPackage()
56 .isEqualTo(ClassName.create("", "SomeClass")); in bestGuessForString_defaultPackage()
57 assertThat(ClassName.bestGuessFromString("SomeClass.Nested")) in bestGuessForString_defaultPackage()
58 .isEqualTo(ClassName.create("", ImmutableList.of("SomeClass"), "Nested")); in bestGuessForString_defaultPackage()
[all …]
/external/javapoet/src/main/java/com/squareup/javapoet/
DClassName.java32 public final class ClassName extends TypeName implements Comparable<ClassName> { class
33 public static final ClassName OBJECT = ClassName.get(Object.class);
39 final ClassName enclosingClassName;
47 private ClassName(String packageName, ClassName enclosingClassName, String simpleName) { in ClassName() method in ClassName
51 private ClassName(String packageName, ClassName enclosingClassName, String simpleName, in ClassName() method in ClassName
62 @Override public ClassName annotated(List<AnnotationSpec> annotations) { in annotated()
63 return new ClassName(packageName, enclosingClassName, simpleName, in annotated()
67 @Override public ClassName withoutAnnotations() { in withoutAnnotations()
69 ClassName resultEnclosingClassName = enclosingClassName != null in withoutAnnotations()
72 return new ClassName(packageName, resultEnclosingClassName, simpleName); in withoutAnnotations()
[all …]
DTypeName.java78 public static final ClassName OBJECT = ClassName.get("java.lang", "Object");
80 private static final ClassName BOXED_VOID = ClassName.get("java.lang", "Void");
81 private static final ClassName BOXED_BOOLEAN = ClassName.get("java.lang", "Boolean");
82 private static final ClassName BOXED_BYTE = ClassName.get("java.lang", "Byte");
83 private static final ClassName BOXED_SHORT = ClassName.get("java.lang", "Short");
84 private static final ClassName BOXED_INT = ClassName.get("java.lang", "Integer");
85 private static final ClassName BOXED_LONG = ClassName.get("java.lang", "Long");
86 private static final ClassName BOXED_CHAR = ClassName.get("java.lang", "Character");
87 private static final ClassName BOXED_FLOAT = ClassName.get("java.lang", "Float");
88 private static final ClassName BOXED_DOUBLE = ClassName.get("java.lang", "Double");
[all …]
DCodeWriter.java57 private final Map<String, ClassName> importedTypes;
58 private final Map<String, ClassName> importableTypes = new LinkedHashMap<>();
77 CodeWriter(Appendable out, String indent, Map<String, ClassName> importedTypes, in CodeWriter()
89 public Map<String, ClassName> importedTypes() { in importedTypes()
216 ClassName deferredTypeName = null; // used by "import static" logic in emit()
240 if (typeName instanceof ClassName && partIterator.hasNext()) { in emit()
242 ClassName candidate = (ClassName) typeName; in emit()
355 String lookupName(ClassName className) { in lookupName()
359 for (ClassName c = className; c != null; c = c.enclosingClassName()) { in lookupName()
360 ClassName resolved = resolve(c.simpleName()); in lookupName()
[all …]
/external/webrtc/webrtc/modules/audio_device/linux/
Dlatebindingsymboltable_linux.h126 #define LATE_BINDING_SYMBOL_TABLE_DECLARE_BEGIN(ClassName) \ argument
134 #define LATE_BINDING_SYMBOL_TABLE_DECLARE_ENTRY(ClassName, sym) \ argument
135 ClassName##_SYMBOL_TABLE_INDEX_##sym,
138 #define LATE_BINDING_SYMBOL_TABLE_DECLARE_END(ClassName) \ argument
139 ClassName##_SYMBOL_TABLE_SIZE \
142 extern const char ClassName##_kDllName[]; \
144 ClassName##_kSymbolNames[ClassName##_SYMBOL_TABLE_SIZE]; \
146 typedef ::webrtc_adm_linux::LateBindingSymbolTable<ClassName##_SYMBOL_TABLE_SIZE, \
147 ClassName##_kDllName, \
148 ClassName##_kSymbolNames> \
[all …]
/external/dagger2/compiler/src/main/java/dagger/internal/codegen/writer/
DClassName.java50 public final class ClassName implements TypeName, Comparable<ClassName> { class
57 private ClassName(String packageName, ImmutableList<String> enclosingSimpleNames, in ClassName() method in ClassName
72 public Optional<ClassName> enclosingClassName() { in enclosingClassName()
74 ? Optional.<ClassName>absent() in enclosingClassName()
75 : Optional.of(new ClassName(packageName, in enclosingClassName()
119 public ClassName topLevelClassName() { in topLevelClassName()
122 ? new ClassName(packageName(), ImmutableList.<String>of(), in topLevelClassName()
127 public ClassName nestedClassNamed(String memberClassName) { in nestedClassNamed()
130 return new ClassName(packageName(), in nestedClassNamed()
138 public ClassName peerNamed(String peerClassName) { in peerNamed()
[all …]
DJavaWriter.java67 private final List<ClassName> explicitImports;
80 explicitImports.add(ClassName.fromClass(importedClass)); in addImport()
86 ClassWriter classWriter = new ClassWriter(ClassName.create(packageName, simpleName)); in addClass()
93 EnumWriter writer = new EnumWriter(ClassName.create(packageName, simpleName)); in addEnum()
99 InterfaceWriter writer = new InterfaceWriter(ClassName.create(packageName, simpleName)); in addInterface()
110 ImmutableSet<ClassName> classNames = FluentIterable.from(typeWriters) in write()
111 .transformAndConcat(new Function<HasClassReferences, Set<ClassName>>() { in write()
113 public Set<ClassName> apply(HasClassReferences input) { in write()
119 ImmutableSortedSet<ClassName> importCandidates = ImmutableSortedSet.<ClassName>naturalOrder() in write()
123 ImmutableSet<ClassName> typeNames = FluentIterable.from(typeWriters) in write()
[all …]
DParameterizedTypeName.java29 private final ClassName type;
32 ParameterizedTypeName(ClassName type, Iterable<? extends TypeName> parameters) { in ParameterizedTypeName()
37 public ClassName type() { in type()
46 public Set<ClassName> referencedClasses() { in referencedClasses()
47 ImmutableSet.Builder<ClassName> builder = new ImmutableSet.Builder<ClassName>() in referencedClasses()
91 public static ParameterizedTypeName create(ClassName className, in create()
96 public static ParameterizedTypeName create(ClassName className, in create()
104 return new ParameterizedTypeName(ClassName.fromClass(parameterizedClass), in create()
DTypeWriter.java30 final ClassName name;
36 TypeWriter(ClassName name) { in TypeWriter()
45 public ClassName name() { in name()
70 new MethodWriter(ClassName.fromClass(returnType), name); in addMethod()
86 implementedTypes.add(ClassName.fromTypeElement(typeElement)); in addImplementedType()
90 return addField(ClassName.fromClass(type), name); in addField()
94 return addField(ClassName.fromTypeElement(type), name); in addField()
/external/catch2/include/internal/
Dcatch_test_registry.h56 #define INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION( TestName, ClassName, ... ) \ argument
58 struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \
66 … #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( TestName, ClassName, ... ) \ argument
69 struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName <TestType>) { \
94 #define INTERNAL_CATCH_TEST_CASE_METHOD2( TestName, ClassName, ... )\ argument
97 struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \
100 … ( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndT…
104 #define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... ) \ argument
105 …_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), ClassName, __VA_ARGS__ )
189 …#define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags… argument
[all …]
/external/dagger2/compiler/src/main/java/dagger/internal/codegen/
DComponentGenerator.java22 import dagger.internal.codegen.writer.ClassName;
60 ClassName nameGeneratedType(BindingGraph input) { in nameGeneratedType()
61 ClassName componentDefinitionClassName = in nameGeneratedType()
62 ClassName.fromTypeElement(input.componentDescriptor().componentDefinitionType()); in nameGeneratedType()
78 static MemberSelect instanceSelect(ClassName owningClass, Snippet snippet) { in instanceSelect()
83 static MemberSelect staticSelect(ClassName owningClass, Snippet snippet) { in staticSelect()
89 ClassName owningClass, Snippet snippet, TypeName castType) { in staticMethodInvocationWithCast()
99 abstract ClassName owningClass(); in owningClass()
109 Snippet getSnippetWithRawTypeCastFor(ClassName usingClass) { in getSnippetWithRawTypeCastFor()
116 Snippet getSnippetFor(ClassName usingClass) { in getSnippetFor()
[all …]
DSourceFileGenerator.java24 import dagger.internal.codegen.writer.ClassName;
50 ClassName generatedTypeName = nameGeneratedType(input); in generate()
67 throw new SourceFileGenerationException(ImmutableList.<ClassName>of(), e, in generate()
72 private static Iterable<ClassName> getNamesForWriters(Iterable<TypeWriter> typeWriters) { in getNamesForWriters()
73 return Iterables.transform(typeWriters, new Function<TypeWriter, ClassName>() { in getNamesForWriters()
74 @Override public ClassName apply(TypeWriter input) { in getNamesForWriters()
83 abstract ClassName nameGeneratedType(T input);
99 abstract ImmutableSet<JavaWriter> write(ClassName generatedTypeName, T input);
DSourceFileGenerationException.java21 import dagger.internal.codegen.writer.ClassName;
39 private final ImmutableSet<ClassName> generatedClassNames;
42 SourceFileGenerationException(Iterable<ClassName> generatedClassNames, Throwable cause, in SourceFileGenerationException()
49 SourceFileGenerationException(Iterable<ClassName> generatedClassNames, Throwable cause) { in SourceFileGenerationException()
53 SourceFileGenerationException(Iterable<ClassName> generatedClassNames, Throwable cause, in SourceFileGenerationException()
58 public ImmutableSet<ClassName> generatedClassNames() { in generatedClassNames()
66 private static String createMessage(Iterable<ClassName> generatedClassNames, String message) { in createMessage()
DProducerFactoryGenerator.java32 import dagger.internal.codegen.writer.ClassName;
80 ClassName nameGeneratedType(ProductionBinding binding) { in nameGeneratedType()
95 ImmutableSet<JavaWriter> write(ClassName generatedTypeName, ProductionBinding binding) { in write()
101 ClassName.fromClass(ListenableFuture.class), providedTypeName); in write()
117 ClassName.fromClass(ProducerToken.class), in write()
172 ClassName.fromClass(ListenableFuture.class), in write()
185 ClassName.fromClass(Producers.class), in write()
201 ClassName.fromClass(AsyncFunction.class), in write()
215 ClassName.fromClass(Futures.class), in write()
275 ClassName.fromClass(Futures.class), in futureSnippet()
[all …]
DSourceFiles.java26 import dagger.internal.codegen.writer.ClassName;
173 return Snippet.format("%s.create(%s)", ClassName.fromClass(DoubleCheckLazy.class), in frameworkTypeUsageStatement()
190 static ClassName generatedClassNameForBinding(Binding binding) { in generatedClassNameForBinding()
196 ClassName enclosingClassName = ClassName.fromTypeElement(contribution.bindingTypeElement()); in generatedClassNameForBinding()
276 static ClassName membersInjectorNameForType(TypeElement typeElement) { in membersInjectorNameForType()
277 ClassName injectedClassName = ClassName.fromTypeElement(typeElement); in membersInjectorNameForType()
283 static ClassName generatedMonitoringModuleName(TypeElement componentElement) { in generatedMonitoringModuleName()
284 ClassName componentName = ClassName.fromTypeElement(componentElement); in generatedMonitoringModuleName()
DMonitoringModuleGenerator.java22 import dagger.internal.codegen.writer.ClassName;
47 Set.class, ClassName.fromClass(ProductionComponentMonitor.Factory.class));
54 ClassName nameGeneratedType(TypeElement componentElement) { in nameGeneratedType()
69 ImmutableSet<JavaWriter> write(ClassName generatedTypeName, TypeElement componentElement) { in write()
83 .addSnippet("return %s.of();", ClassName.fromClass(ImmutableSet.class)); in write()
87 providerField.setInitializer("new %s()", ClassName.fromClass(MonitorCache.class)); in write()
91 ParameterizedTypeName.create(Provider.class, ClassName.fromTypeElement(componentElement)), in write()
/external/protobuf/src/google/protobuf/compiler/cpp/
Dcpp_service.cc148 sub_vars["input_type"] = ClassName(method->input_type(), true); in GenerateMethodSignatures()
149 sub_vars["output_type"] = ClassName(method->output_type(), true); in GenerateMethodSignatures()
219 sub_vars["input_type"] = ClassName(method->input_type(), true); in GenerateNotImplementedMethods()
220 sub_vars["output_type"] = ClassName(method->output_type(), true); in GenerateNotImplementedMethods()
249 sub_vars["input_type"] = ClassName(method->input_type(), true); in GenerateCallMethod()
250 sub_vars["output_type"] = ClassName(method->output_type(), true); in GenerateCallMethod()
294 sub_vars["type"] = ClassName(type, true); in GenerateGetPrototype()
317 sub_vars["input_type"] = ClassName(method->input_type(), true); in GenerateStubMethods()
318 sub_vars["output_type"] = ClassName(method->output_type(), true); in GenerateStubMethods()
Dcpp_extension.cc54 return ClassName(extendee, true); in ExtendeeClassName()
71 type_traits_.append(ClassName(descriptor_->enum_type(), true)); in ExtensionGenerator()
73 type_traits_.append(ClassName(descriptor_->enum_type(), true)); in ExtensionGenerator()
81 type_traits_.append(ClassName(descriptor_->message_type(), true)); in ExtensionGenerator()
128 ClassName(descriptor_->extension_scope(), false) + "::"; in GenerateDefinition()
187 "type", ClassName(descriptor_->enum_type(), true)); in GenerateRegistration()
196 "type", ClassName(descriptor_->message_type(), true)); in GenerateRegistration()
/external/tensorflow/tensorflow/java/src/gen/java/org/tensorflow/processor/
DOperatorProcessor.java22 import com.squareup.javapoet.ClassName;
151 private static final TypeName T_OPS = ClassName.get("org.tensorflow.op", "Ops");
153 ClassName.get("org.tensorflow.op.annotation", "Operator");
154 private static final TypeName T_SCOPE = ClassName.get("org.tensorflow.op", "Scope");
155 private static final TypeName T_GRAPH = ClassName.get("org.tensorflow", "Graph");
156 private static final TypeName T_STRING = ClassName.get(String.class);
179 Map<String, ClassName> groups = new HashMap<>(); in writeApi()
186 groups.put(entry.getKey(), ClassName.get("org.tensorflow.op", groupClass.name)); in writeApi()
223 ClassName opClassName = ClassName.get(opClass); in collectOpMethods()
240 String methodName, ClassName opClassName, ExecutableElement factoryMethod) { in buildOpMethod()
[all …]

123456789