Lines Matching refs:klass
178 void AssertField(mirror::Class* klass, mirror::ArtField* field) in AssertField() argument
182 EXPECT_EQ(klass, field->GetDeclaringClass()); in AssertField()
189 void AssertClass(const std::string& descriptor, Handle<mirror::Class> klass) in AssertClass() argument
192 EXPECT_STREQ(descriptor.c_str(), klass->GetDescriptor(&temp)); in AssertClass()
194 EXPECT_FALSE(klass->HasSuperClass()); in AssertClass()
196 EXPECT_TRUE(klass->HasSuperClass()); in AssertClass()
197 EXPECT_TRUE(klass->GetSuperClass() != NULL); in AssertClass()
199 EXPECT_TRUE(klass->GetClass() != NULL); in AssertClass()
200 EXPECT_EQ(klass->GetClass(), klass->GetClass()->GetClass()); in AssertClass()
201 EXPECT_TRUE(klass->GetDexCache() != NULL); in AssertClass()
202 EXPECT_TRUE(klass->IsLoaded()); in AssertClass()
203 EXPECT_TRUE(klass->IsResolved()); in AssertClass()
204 EXPECT_FALSE(klass->IsErroneous()); in AssertClass()
205 EXPECT_FALSE(klass->IsArrayClass()); in AssertClass()
206 EXPECT_TRUE(klass->GetComponentType() == NULL); in AssertClass()
207 EXPECT_TRUE(klass->IsInSamePackage(klass.Get())); in AssertClass()
209 EXPECT_TRUE(mirror::Class::IsInSamePackage(klass->GetDescriptor(&temp), in AssertClass()
210 klass->GetDescriptor(&temp2))); in AssertClass()
211 if (klass->IsInterface()) { in AssertClass()
212 EXPECT_TRUE(klass->IsAbstract()); in AssertClass()
213 if (klass->NumDirectMethods() == 1) { in AssertClass()
214 EXPECT_TRUE(klass->GetDirectMethod(0)->IsClassInitializer()); in AssertClass()
215 EXPECT_TRUE(klass->GetDirectMethod(0)->IsDirect()); in AssertClass()
217 EXPECT_EQ(0U, klass->NumDirectMethods()); in AssertClass()
220 if (!klass->IsSynthetic()) { in AssertClass()
221 EXPECT_NE(0U, klass->NumDirectMethods()); in AssertClass()
224 EXPECT_EQ(klass->IsInterface(), !klass->HasVTable()); in AssertClass()
225 mirror::IfTable* iftable = klass->GetIfTable(); in AssertClass()
226 for (int i = 0; i < klass->GetIfTableCount(); i++) { in AssertClass()
229 if (klass->IsInterface()) { in AssertClass()
235 if (klass->IsAbstract()) { in AssertClass()
236 EXPECT_FALSE(klass->IsFinal()); in AssertClass()
238 EXPECT_FALSE(klass->IsAnnotation()); in AssertClass()
240 if (klass->IsFinal()) { in AssertClass()
241 EXPECT_FALSE(klass->IsAbstract()); in AssertClass()
242 EXPECT_FALSE(klass->IsAnnotation()); in AssertClass()
244 if (klass->IsAnnotation()) { in AssertClass()
245 EXPECT_FALSE(klass->IsFinal()); in AssertClass()
246 EXPECT_TRUE(klass->IsAbstract()); in AssertClass()
249 EXPECT_FALSE(klass->IsPrimitive()); in AssertClass()
250 EXPECT_TRUE(klass->CanAccess(klass.Get())); in AssertClass()
252 for (size_t i = 0; i < klass->NumDirectMethods(); i++) { in AssertClass()
253 mirror::ArtMethod* method = klass->GetDirectMethod(i); in AssertClass()
256 EXPECT_EQ(klass.Get(), method->GetDeclaringClass()); in AssertClass()
259 for (size_t i = 0; i < klass->NumVirtualMethods(); i++) { in AssertClass()
260 mirror::ArtMethod* method = klass->GetVirtualMethod(i); in AssertClass()
263 EXPECT_TRUE(method->GetDeclaringClass()->IsAssignableFrom(klass.Get())); in AssertClass()
266 for (size_t i = 0; i < klass->NumInstanceFields(); i++) { in AssertClass()
267 mirror::ArtField* field = klass->GetInstanceField(i); in AssertClass()
268 AssertField(klass.Get(), field); in AssertClass()
272 for (size_t i = 0; i < klass->NumStaticFields(); i++) { in AssertClass()
273 mirror::ArtField* field = klass->GetStaticField(i); in AssertClass()
274 AssertField(klass.Get(), field); in AssertClass()
279 EXPECT_GE(klass->NumInstanceFields(), klass->NumReferenceInstanceFields()); in AssertClass()
282 for (size_t i = 0; i < klass->NumReferenceInstanceFields(); i++) { in AssertClass()
283 mirror::ArtField* field = klass->GetInstanceField(i); in AssertClass()
290 for (size_t i = klass->NumReferenceInstanceFields(); i < klass->NumInstanceFields(); i++) { in AssertClass()
291 mirror::ArtField* field = klass->GetInstanceField(i); in AssertClass()
303 mirror::Class* k = klass.Get(); in AssertClass()
308 EXPECT_EQ(klass->GetReferenceInstanceOffsets() == 0, total_num_reference_instance_fields == 0); in AssertClass()
316 Handle<mirror::Class> klass( in AssertDexFileClass() local
318 ASSERT_TRUE(klass.Get() != nullptr); in AssertDexFileClass()
320 EXPECT_STREQ(descriptor.c_str(), klass.Get()->GetDescriptor(&temp)); in AssertDexFileClass()
321 EXPECT_EQ(class_loader, klass->GetClassLoader()); in AssertDexFileClass()
322 if (klass->IsPrimitive()) { in AssertDexFileClass()
323 AssertPrimitiveClass(descriptor, klass.Get()); in AssertDexFileClass()
324 } else if (klass->IsArrayClass()) { in AssertDexFileClass()
325 AssertArrayClass(descriptor, klass); in AssertDexFileClass()
327 AssertClass(descriptor, klass); in AssertDexFileClass()
377 mirror::Class* klass = in Check() local
379 CHECK(klass != NULL) << class_descriptor; in Check()
383 if (!klass->IsClassClass() && !is_static) { in Check()
384 size_t expected_size = is_static ? klass->GetClassSize(): klass->GetObjectSize(); in Check()
394 size_t num_fields = is_static ? klass->NumStaticFields() : klass->NumInstanceFields(); in Check()
404 mirror::ArtField* field = is_static ? klass->GetStaticField(i) : klass->GetInstanceField(i); in Check()
413 mirror::ArtField* field = is_static ? klass->GetStaticField(i) : klass->GetInstanceField(i); in Check()
427 mirror::ArtField* field = is_static ? klass->GetStaticField(i) : klass->GetInstanceField(i); in Check()
435 mirror::ArtField* field = is_static ? klass->GetStaticField(i) : klass->GetInstanceField(i); in Check()
1012 mirror::Class* klass = class_linker_->FindClass(soa.Self(), "LStaticsFromCode;", class_loader); in TEST_F() local
1013 mirror::ArtMethod* clinit = klass->FindClassInitializer(); in TEST_F()
1014 mirror::ArtMethod* getS0 = klass->FindDirectMethod("getS0", "()Ljava/lang/Object;"); in TEST_F()
1066 mirror::Class* klass = class_linker_->GetClassRoot(ClassLinker::ClassRoot(i)); in TEST_F() local
1067 EXPECT_GT(strlen(klass->GetDescriptor(&temp)), 0U); in TEST_F()
1068 EXPECT_STREQ(klass->GetDescriptor(&temp), in TEST_F()