Home
last modified time | relevance | path

Searched refs:ctClass (Results 1 – 9 of 9) sorted by relevance

/external/robolectric/src/main/java/com/xtremelabs/robolectric/bytecode/
DAndroidTranslator.java89 CtClass ctClass; in onLoad() local
91 ctClass = classPool.get(className); in onLoad()
96 if (shouldInstrument(ctClass)) { in onLoad()
97 int modifiers = ctClass.getModifiers(); in onLoad()
99 ctClass.setModifiers(modifiers & ~Modifier.FINAL); in onLoad()
102 classHandler.instrument(ctClass); in onLoad()
104 fixConstructors(ctClass); in onLoad()
105 fixMethods(ctClass); in onLoad()
108 classCache.addClass(className, ctClass.toBytecode()); in onLoad()
115 /* package */ boolean shouldInstrument(CtClass ctClass) { in shouldInstrument() argument
[all …]
DType.java51 public static Type find(CtClass ctClass) { in find() argument
52 if (ctClass.equals(CtClass.voidType)) { in find()
54 } else if (ctClass.equals(CtClass.booleanType)) { in find()
56 } else if (ctClass.equals(CtClass.byteType)) { in find()
58 } else if (ctClass.equals(CtClass.charType)) { in find()
60 } else if (ctClass.equals(CtClass.shortType)) { in find()
62 } else if (ctClass.equals(CtClass.intType)) { in find()
64 } else if (ctClass.equals(CtClass.longType)) { in find()
66 } else if (ctClass.equals(CtClass.floatType)) { in find()
68 } else if (ctClass.equals(CtClass.doubleType)) { in find()
[all …]
DShadowWrangler.java55 public void instrument(CtClass ctClass) { in instrument() argument
57 CtClass objectClass = ctClass.getClassPool().get(Object.class.getName()); in instrument()
59 ctClass.getField(SHADOW_FIELD_NAME); in instrument()
61 CtField field = new CtField(objectClass, SHADOW_FIELD_NAME, ctClass); in instrument()
63 ctClass.addField(field); in instrument()
DClassHandler.java10 void instrument(CtClass ctClass); in instrument() argument
/external/robolectric/src/test/java/com/xtremelabs/robolectric/bytecode/
DAndroidTranslatorUnitTest.java25 CtClass ctClass = classPool.get("java.lang.String"); in whenMethodReturnsObject_shouldGenerateMethodBody() local
27 ctClass, ctClass.getDeclaredMethod("substring", new CtClass[]{CtClass.intType}), in whenMethodReturnsObject_shouldGenerateMethodBody()
28 ctClass, Type.OBJECT, false, false); in whenMethodReturnsObject_shouldGenerateMethodBody()
39 CtClass ctClass = classPool.get("java.lang.String"); in whenMethodReturnsPrimitive_shouldGenerateMethodBody() local
41 ctClass, ctClass.getDeclaredMethod("length"), in whenMethodReturnsPrimitive_shouldGenerateMethodBody()
42 ctClass, Type.OBJECT, false, false); in whenMethodReturnsPrimitive_shouldGenerateMethodBody()
53 CtClass ctClass = classPool.get("java.lang.Object"); in whenMethodReturnsVoid_shouldGenerateMethodBody() local
55 ctClass, ctClass.getDeclaredMethod("wait"), in whenMethodReturnsVoid_shouldGenerateMethodBody()
56 ctClass, Type.VOID, false, false); in whenMethodReturnsVoid_shouldGenerateMethodBody()
66 CtClass ctClass = classPool.get("java.lang.String"); in whenMethodIsStatic_shouldGenerateMethodBody() local
[all …]
/external/android-mock/tests/com/google/android/testing/mocking/
DClassTypeTests.java87 CtClass ctClass; in getMethodNames() local
89 ctClass = ClassPool.getDefault().getCtClass(clazz.getClassName()); in getMethodNames()
90 if (ctClass.isFrozen()) { in getMethodNames()
91 ctClass.defrost(); in getMethodNames()
97 ctClass = ClassPool.getDefault().makeClass(classInputStream); in getMethodNames()
98 return getMethodNames(ctClass.getDeclaredMethods()); in getMethodNames()
DAndroidFrameworkMockGeneratorTest.java140 CtClass ctClass = ClassPool.getDefault().get(mock.getClassName()); in testGetMocksForClass() local
141 createdClasses.add(ctClass); in testGetMocksForClass()
142 ctClass.toClass(); in testGetMocksForClass()
DAndroidMockTest.java92 CtClass ctClass; in compileClasses() local
93 ctClass = ClassPool.getDefault().get(clazz.getClassName()); in compileClasses()
95 ctClass.toClass(); in compileClasses()
/external/android-mock/src/com/google/android/testing/mocking/
DAndroidFrameworkMockGenerator.java63 CtClass ctClass = AndroidMockGenerator.getClassPool().get(prebuiltClass.getName()); in getMocksForClass() local
64 classList.add(new GeneratedClassFile(ctClass.getName(), ctClass.toBytecode())); in getMocksForClass()