Home
last modified time | relevance | path

Searched refs:clazz (Results 1 – 25 of 232) sorted by relevance

12345678910

/dalvik/vm/oo/
DClass.cpp179 static void loadMethodFromDex(ClassObject* clazz, const DexMethod* pDexMethod,\
182 static void loadSFieldFromDex(ClassObject* clazz,
184 static void loadIFieldFromDex(ClassObject* clazz,
186 static bool precacheReferenceOffsets(ClassObject* clazz);
187 static void computeRefOffsets(ClassObject* clazz);
189 static bool createVtable(ClassObject* clazz);
190 static bool createIftable(ClassObject* clazz);
191 static bool insertMethodStubs(ClassObject* clazz);
192 static bool computeFieldOffsets(ClassObject* clazz);
193 static void throwEarlierClassFailure(ClassObject* clazz);
[all …]
DTypeCheck.cpp82 const ClassObject* clazz) in isArrayInstanceOfArray() argument
85 assert(dvmIsArrayClass(clazz)); in isArrayInstanceOfArray()
94 assert(subDim > 0 && clazz->arrayDim > 0); in isArrayInstanceOfArray()
95 if (subDim == clazz->arrayDim) { in isArrayInstanceOfArray()
100 return dvmInstanceof(subElemClass, clazz->elementClass); in isArrayInstanceOfArray()
101 } else if (subDim > clazz->arrayDim) { in isArrayInstanceOfArray()
108 if (dvmIsInterfaceClass(clazz->elementClass)) { in isArrayInstanceOfArray()
114 return dvmImplements(clazz, clazz->elementClass); in isArrayInstanceOfArray()
121 return (clazz->elementClass == clazz->super); in isArrayInstanceOfArray()
137 static int isArrayInstanceOf(const ClassObject* sub, const ClassObject* clazz) in isArrayInstanceOf() argument
[all …]
DObject.cpp27 InstField* dvmFindInstanceField(const ClassObject* clazz, in dvmFindInstanceField() argument
33 assert(clazz != NULL); in dvmFindInstanceField()
41 pField = clazz->ifields; in dvmFindInstanceField()
42 for (i = 0; i < clazz->ifieldCount; i++, pField++) { in dvmFindInstanceField()
61 InstField* dvmFindInstanceFieldHier(const ClassObject* clazz, in dvmFindInstanceFieldHier() argument
69 pField = dvmFindInstanceField(clazz, fieldName, signature); in dvmFindInstanceFieldHier()
73 if (clazz->super != NULL) in dvmFindInstanceFieldHier()
74 return dvmFindInstanceFieldHier(clazz->super, fieldName, signature); in dvmFindInstanceFieldHier()
85 StaticField* dvmFindStaticField(const ClassObject* clazz, in dvmFindStaticField() argument
91 assert(clazz != NULL); in dvmFindStaticField()
[all …]
DObject.h92 #define SET_CLASS_FLAG(clazz, flag) \ argument
93 do { (clazz)->accessFlags |= (flag); } while (0)
95 #define CLEAR_CLASS_FLAG(clazz, flag) \ argument
96 do { (clazz)->accessFlags &= ~(flag); } while (0)
98 #define IS_CLASS_FLAG_SET(clazz, flag) \ argument
99 (((clazz)->accessFlags & (flag)) != 0)
101 #define GET_CLASS_FLAG_GROUP(clazz, flags) \ argument
102 ((u4)((clazz)->accessFlags & (flags)))
185 ClassObject* clazz; member
210 ClassObject* clazz; member
[all …]
DTypeCheck.h29 const ClassObject* clazz);
36 INLINE int dvmInstanceof(const ClassObject* instance, const ClassObject* clazz) in dvmInstanceof() argument
38 if (instance == clazz) { in dvmInstanceof()
43 return dvmInstanceofNonTrivial(instance, clazz); in dvmInstanceof()
51 int dvmImplements(const ClassObject* clazz, const ClassObject* interface);
58 INLINE int dvmIsSubClass(const ClassObject* sub, const ClassObject* clazz) { in dvmIsSubClass() argument
61 if (sub == clazz) in dvmIsSubClass()
DArray.h76 return ( ((Object*)arrayObj)->clazz->descriptor[0] == '[' ); in dvmIsArray()
84 INLINE bool dvmIsObjectArrayClass(const ClassObject* clazz) in dvmIsObjectArrayClass() argument
86 const char* descriptor = clazz->descriptor; in dvmIsObjectArrayClass()
98 return dvmIsObjectArrayClass(arrayObj->clazz); in dvmIsObjectArray()
107 INLINE bool dvmIsArrayClass(const ClassObject* clazz) in dvmIsArrayClass() argument
109 return (clazz->descriptor[0] == '['); in dvmIsArrayClass()
138 size_t dvmArrayClassElementWidth(const ClassObject* clazz);
DClass.h69 void dvmSetClassSerialNumber(ClassObject* clazz);
118 bool dvmLinkClass(ClassObject* clazz);
123 INLINE bool dvmIsClassInitialized(const ClassObject* clazz) { in dvmIsClassInitialized() argument
124 return (clazz->status == CLASS_INITIALIZED); in dvmIsClassInitialized()
126 bool dvmIsClassInitializing(const ClassObject* clazz);
131 extern "C" bool dvmInitClass(ClassObject* clazz);
143 void dvmFreeClassInnards(ClassObject* clazz);
144 bool dvmAddClassToHash(ClassObject* clazz);
145 void dvmAddInitiatingLoader(ClassObject* clazz, Object* loader);
146 bool dvmLoaderInInitiatingList(const ClassObject* clazz, const Object* loader);
[all …]
/dalvik/vm/reflect/
DReflect.h32 ArrayObject* dvmGetDeclaredFields(ClassObject* clazz, bool publicOnly);
37 Object* dvmGetDeclaredField(ClassObject* clazz, StringObject* nameObj);
42 ArrayObject* dvmGetDeclaredConstructors(ClassObject* clazz, bool publicOnly);
51 ArrayObject* dvmGetDeclaredMethods(ClassObject* clazz, bool publicOnly);
56 Object* dvmGetDeclaredConstructorOrMethod(ClassObject* clazz,
63 ArrayObject* dvmGetInterfaces(ClassObject* clazz);
68 Field* dvmSlotToField(ClassObject* clazz, int slot);
69 Method* dvmSlotToMethod(ClassObject* clazz, int slot);
109 Object* dvmCreateReflectObjForField(const ClassObject* clazz, Field* field);
110 Object* dvmCreateReflectObjForMethod(const ClassObject* clazz, Method* method);
[all …]
DReflect.cpp48 ClassObject* clazz; in dvmValidateBoxClasses() local
50 clazz = dvmFindClassNoInit(*ccp, NULL); in dvmValidateBoxClasses()
51 if (clazz == NULL) { in dvmValidateBoxClasses()
56 if (clazz->ifieldCount != 1) { in dvmValidateBoxClasses()
58 clazz->ifieldCount, *ccp); in dvmValidateBoxClasses()
77 ClassObject* clazz = NULL; in convertSignaturePartToClass() local
94 clazz = dvmFindArrayClass(*pSignature, defClass->classLoader); in convertSignaturePartToClass()
103 clazz = dvmFindClassNoInit(*pSignature, defClass->classLoader); in convertSignaturePartToClass()
106 clazz = dvmFindPrimitiveClass(*signature++); in convertSignaturePartToClass()
109 if (clazz == NULL) { in convertSignaturePartToClass()
[all …]
DAnnotation.cpp38 static Object* processEncodedAnnotation(const ClassObject* clazz,\
40 static bool skipEncodedAnnotation(const ClassObject* clazz, const u1** pPtr);
88 const ClassObject* clazz) in getAnnoDirectory() argument
96 pClassDef = dexFindClass(pDexFile, clazz->descriptor); in getAnnoDirectory()
317 static bool processAnnotationValue(const ClassObject* clazz, in processAnnotationValue() argument
335 (ptr-1) - (u1*)clazz->pDvmDex->pDexFile->baseAddr); in processAnnotationValue()
411 elemObj = (Object*) dvmResolveString(clazz, idx); in processAnnotationValue()
423 elemObj = (Object*) dvmResolveClass(clazz, idx, true); in processAnnotationValue()
427 DexFile* pDexFile = clazz->pDvmDex->pDexFile; in processAnnotationValue()
442 Method* meth = resolveAmbiguousMethod(clazz, idx); in processAnnotationValue()
[all …]
/dalvik/vm/alloc/
DVisitInlines.h27 assert(obj->clazz != NULL); in visitFields()
28 if (obj->clazz->refOffsets != CLASS_WALK_SUPER) { in visitFields()
29 size_t refOffsets = obj->clazz->refOffsets; in visitFields()
38 for (ClassObject *clazz = obj->clazz; in visitFields() local
39 clazz != NULL; in visitFields()
40 clazz = clazz->super) { in visitFields()
41 InstField *field = clazz->ifields; in visitFields()
42 for (int i = 0; i < clazz->ifieldRefCount; ++i, ++field) { in visitFields()
54 static void visitStaticFields(Visitor *visitor, ClassObject *clazz, in visitStaticFields() argument
58 assert(clazz != NULL); in visitStaticFields()
[all …]
DAlloc.cpp95 ClassObject* clazz; in createStockException() local
100 clazz = dvmFindSystemClass(descriptor); in createStockException()
101 if (clazz == NULL) { in createStockException()
106 init = dvmFindDirectMethodByDescriptor(clazz, "<init>", in createStockException()
113 obj = dvmAllocObject(clazz, ALLOC_DEFAULT); in createStockException()
181 Object* dvmAllocObject(ClassObject* clazz, int flags) in dvmAllocObject() argument
185 assert(clazz != NULL); in dvmAllocObject()
186 assert(dvmIsClassInitialized(clazz) || dvmIsClassInitializing(clazz)); in dvmAllocObject()
189 newObj = (Object*)dvmMalloc(clazz->objectSize, flags); in dvmAllocObject()
191 DVM_OBJECT_INIT(newObj, clazz); in dvmAllocObject()
[all …]
/dalvik/vm/mterp/c/
DOP_CHECK_CAST.cpp3 ClassObject* clazz; in HANDLE_OPCODE() local
18 clazz = dvmDexGetResolvedClass(methodClassDex, ref); in HANDLE_OPCODE()
19 if (clazz == NULL) { in HANDLE_OPCODE()
20 clazz = dvmResolveClass(curMethod->clazz, ref, false); in HANDLE_OPCODE()
21 if (clazz == NULL) in HANDLE_OPCODE()
24 if (!dvmInstanceof(obj->clazz, clazz)) { in HANDLE_OPCODE()
25 dvmThrowClassCastException(obj->clazz, clazz); in HANDLE_OPCODE()
DOP_NEW_INSTANCE.cpp3 ClassObject* clazz; in HANDLE_OPCODE() local
11 clazz = dvmDexGetResolvedClass(methodClassDex, ref); in HANDLE_OPCODE()
12 if (clazz == NULL) { in HANDLE_OPCODE()
13 clazz = dvmResolveClass(curMethod->clazz, ref, false); in HANDLE_OPCODE()
14 if (clazz == NULL) in HANDLE_OPCODE()
18 if (!dvmIsClassInitialized(clazz) && !dvmInitClass(clazz)) in HANDLE_OPCODE()
42 newObj = dvmAllocObject(clazz, ALLOC_DONT_TRACK); in HANDLE_OPCODE()
DOP_CONST_CLASS.cpp3 ClassObject* clazz; in HANDLE_OPCODE() local
8 clazz = dvmDexGetResolvedClass(methodClassDex, ref); in HANDLE_OPCODE()
9 if (clazz == NULL) { in HANDLE_OPCODE()
11 clazz = dvmResolveClass(curMethod->clazz, ref, true); in HANDLE_OPCODE()
12 if (clazz == NULL) in HANDLE_OPCODE()
15 SET_REGISTER(vdst, (u4) clazz); in HANDLE_OPCODE()
DOP_INSTANCE_OF.cpp3 ClassObject* clazz; in HANDLE_OPCODE() local
19 clazz = dvmDexGetResolvedClass(methodClassDex, ref); in HANDLE_OPCODE()
20 if (clazz == NULL) { in HANDLE_OPCODE()
22 clazz = dvmResolveClass(curMethod->clazz, ref, true); in HANDLE_OPCODE()
23 if (clazz == NULL) in HANDLE_OPCODE()
26 SET_REGISTER(vdst, dvmInstanceof(obj->clazz, clazz)); in HANDLE_OPCODE()
DOP_APUT_OBJECT.cpp24 if (!dvmCanPutArrayElement(obj->clazz, arrayObj->clazz)) { in HANDLE_OPCODE()
26 obj->clazz->descriptor, obj, in HANDLE_OPCODE()
27 arrayObj->clazz->descriptor, arrayObj); in HANDLE_OPCODE()
28 dvmThrowArrayStoreExceptionIncompatibleElement(obj->clazz, arrayObj->clazz); in HANDLE_OPCODE()
/dalvik/vm/native/
Djava_lang_Class.cpp140 ClassObject* clazz = (ClassObject*) args[0]; in Dalvik_java_lang_Class_getClassLoader() local
142 RETURN_PTR(clazz->classLoader); in Dalvik_java_lang_Class_getClassLoader()
182 ClassObject* clazz = (ClassObject*) args[0]; in Dalvik_java_lang_Class_getDeclaredClasses() local
186 classes = dvmGetDeclaredClasses(clazz); in Dalvik_java_lang_Class_getDeclaredClasses()
233 ClassObject* clazz = (ClassObject*) args[0]; in Dalvik_java_lang_Class_getDeclaredConstructors() local
237 constructors = dvmGetDeclaredConstructors(clazz, publicOnly); in Dalvik_java_lang_Class_getDeclaredConstructors()
249 ClassObject* clazz = (ClassObject*) args[0]; in Dalvik_java_lang_Class_getDeclaredFields() local
253 fields = dvmGetDeclaredFields(clazz, publicOnly); in Dalvik_java_lang_Class_getDeclaredFields()
265 ClassObject* clazz = (ClassObject*) args[0]; in Dalvik_java_lang_Class_getDeclaredField() local
267 Object* fieldObj = dvmGetDeclaredField(clazz, nameObj); in Dalvik_java_lang_Class_getDeclaredField()
[all …]
DInternalNative.cpp100 const char* classDescriptor = method->clazz->descriptor; in dvmLookupInternalNativeMethod()
155 bool dvmVerifyObjectInClass(Object* obj, ClassObject* clazz) { in dvmVerifyObjectInClass() argument
159 } else if (!dvmInstanceof(obj->clazz, clazz)) { in dvmVerifyObjectInClass()
167 std::string expectedClassName(dvmHumanReadableDescriptor(clazz->descriptor)); in dvmVerifyObjectInClass()
180 ClassObject* clazz = NULL; in dvmFindClassByName() local
207 clazz = dvmFindClass(descriptor, loader); in dvmFindClassByName()
209 clazz = dvmFindClassNoInit(descriptor, loader); in dvmFindClassByName()
211 if (clazz == NULL) { in dvmFindClassByName()
221 descriptor, doInit, clazz, clazz->classLoader); in dvmFindClassByName()
227 return clazz; in dvmFindClassByName()
Djava_lang_VMClassLoader.cpp83 ClassObject* clazz = NULL; in Dalvik_java_lang_VMClassLoader_findLoadedClass() local
103 clazz = dvmLookupClass(descriptor, loader, false); in Dalvik_java_lang_VMClassLoader_findLoadedClass()
104 LOGVV("look: %s ldr=%p --> %p", descriptor, loader, clazz); in Dalvik_java_lang_VMClassLoader_findLoadedClass()
109 RETURN_PTR(clazz); in Dalvik_java_lang_VMClassLoader_findLoadedClass()
176 ClassObject* clazz; in Dalvik_java_lang_VMClassLoader_loadClass() local
178 clazz = dvmFindClassByName(nameObj, NULL, resolve); in Dalvik_java_lang_VMClassLoader_loadClass()
179 assert(clazz == NULL || dvmIsClassLinked(clazz)); in Dalvik_java_lang_VMClassLoader_loadClass()
180 RETURN_PTR(clazz); in Dalvik_java_lang_VMClassLoader_loadClass()
/dalvik/tests/031-class-attributes/src/
DClassAttrs.java124 public static void printClassAttrs(Class clazz) { in printClassAttrs() argument
127 System.out.println("***** " + clazz + ":"); in printClassAttrs()
130 + clazz.getName()); in printClassAttrs()
132 + clazz.getCanonicalName()); in printClassAttrs()
134 + clazz.getSimpleName()); in printClassAttrs()
136 + getSignatureAttribute(clazz)); in printClassAttrs()
139 + clazz.getSuperclass()); in printClassAttrs()
141 + clazz.getGenericSuperclass()); in printClassAttrs()
143 + clazz.getDeclaringClass()); in printClassAttrs()
145 + clazz.getEnclosingClass()); in printClassAttrs()
[all …]
/dalvik/vm/hprof/
DHprofClass.cpp40 static u4 computeClassHash(const ClassObject *clazz) in computeClassHash() argument
46 cp = clazz->descriptor; in computeClassHash()
47 hash = (u4)clazz->classLoader; in computeClassHash()
73 hprof_class_object_id hprofLookupClassId(const ClassObject *clazz) in hprofLookupClassId() argument
77 if (clazz == NULL) { in hprofLookupClassId()
89 val = dvmHashTableLookup(gClassHashTable, computeClassHash(clazz), in hprofLookupClassId()
90 (void *)clazz, classCmp, true); in hprofLookupClassId()
100 getPrettyClassNameId(clazz->descriptor); in hprofLookupClassId()
102 return (hprof_class_object_id)clazz; in hprofLookupClassId()
119 const ClassObject *clazz; in hprofDumpClasses() local
[all …]
/dalvik/tests/085-old-style-inner-class/src/
DMain.java33 private static String nameOf(Class clazz) { in nameOf() argument
34 return (clazz == null) ? "(null)" : clazz.getName(); in nameOf()
41 private static void infoFor(Class clazz) { in infoFor() argument
42 System.out.println("Class: " + nameOf(clazz) + "\n" + in infoFor()
44 nameOf(clazz.getDeclaringClass()) + "\n" + in infoFor()
46 nameOf(clazz.getEnclosingClass()) + "\n" + in infoFor()
48 nameOf(clazz.getEnclosingMethod())); in infoFor()
/dalvik/tests/004-annotations/src/android/test/anno/
DTestAnnotations.java28 static void printAnnotations(Class clazz) { in printAnnotations() argument
32 annos = clazz.getAnnotations(); in printAnnotations()
33 System.out.println("annotations on TYPE " + clazz + in printAnnotations()
38 for (Constructor c: clazz.getDeclaredConstructors()) { in printAnnotations()
49 for (Method m: clazz.getDeclaredMethods()) { in printAnnotations()
60 for (Field f: clazz.getDeclaredFields()) { in printAnnotations()
158 Class clazz; in main() local
159 clazz = SimplyNoted.class; in main()
160 printAnnotations(clazz); in main()
161 clazz = INoted.class; in main()
[all …]
/dalvik/vm/analysis/
DOptimize.cpp120 void dvmOptimizeClass(ClassObject* clazz, bool essentialOnly) in dvmOptimizeClass() argument
124 for (i = 0; i < clazz->directMethodCount; i++) { in dvmOptimizeClass()
125 optimizeMethod(&clazz->directMethods[i], essentialOnly); in dvmOptimizeClass()
127 for (i = 0; i < clazz->virtualMethodCount; i++) { in dvmOptimizeClass()
128 optimizeMethod(&clazz->virtualMethods[i], essentialOnly); in dvmOptimizeClass()
359 DvmDex* pDvmDex = meth->clazz->pDvmDex; in dvmUpdateCodeUnit()
469 if (strcmp(excep->clazz->descriptor, in dvmOptResolveClass()
567 tweakLoader(referrer, resField->clazz); in dvmOptResolveInstField()
569 untweakLoader(referrer, resField->clazz); in dvmOptResolveInstField()
572 referrer->descriptor, resField->clazz->descriptor, in dvmOptResolveInstField()
[all …]

12345678910