Home
last modified time | relevance | path

Searched refs:mutableClass (Results 1 – 7 of 7) sorted by relevance

/external/robolectric-shadows/sandbox/src/main/java/org/robolectric/internal/bytecode/
DClassInstrumentor.java67 byte[] instrumentToBytes(MutableClass mutableClass) { in instrumentToBytes() argument
68 instrument(mutableClass); in instrumentToBytes()
70 ClassNode classNode = mutableClass.classNode; in instrumentToBytes()
71 ClassWriter writer = new InstrumentingClassWriter(mutableClass.classNodeProvider, classNode); in instrumentToBytes()
76 return mutableClass.config.mappedTypeName(internalName); in instrumentToBytes()
86 MutableClass mutableClass = analyzeClass(origBytes, config, classNodeProvider); in instrument() local
87 return instrumentToBytes(mutableClass); in instrument()
90 public void instrument(MutableClass mutableClass) { in instrument() argument
93 if (mutableClass.isInterface()) { in instrument()
97 makeClassPublic(mutableClass.classNode); in instrument()
[all …]
DShadowDecorator.java20 public void decorate(MutableClass mutableClass) { in decorate() argument
21 mutableClass.addInterface(Type.getInternalName(ShadowedObject.class)); in decorate()
23 mutableClass.addField(0, new FieldNode(Opcodes.ACC_PUBLIC, in decorate()
26 addRoboGetDataMethod(mutableClass); in decorate()
44 public void decorateMethodPreClassHandler(MutableClass mutableClass, MethodNode originalMethod, in decorateMethodPreClassHandler() argument
54 …generator.getField(mutableClass.classType, ShadowConstants.CLASS_HANDLER_DATA_FIELD_NAME, OBJECT_T… in decorateMethodPreClassHandler()
55 …generator.instanceOf(mutableClass.classType); // __robo_data__, is instance of sam… in decorateMethodPreClassHandler()
60 …generator.getField(mutableClass.classType, ShadowConstants.CLASS_HANDLER_DATA_FIELD_NAME, OBJECT_T… in decorateMethodPreClassHandler()
61 …generator.checkCast(mutableClass.classType); // __robo_data__ but cast to my class in decorateMethodPreClassHandler()
64 …generator.visitMethodInsn(Opcodes.INVOKESPECIAL, mutableClass.internalClassName, originalMethod.na… in decorateMethodPreClassHandler()
[all …]
DInvokeDynamicClassInstrumentor.java45 protected void addDirectCallConstructor(MutableClass mutableClass) { in addDirectCallConstructor() argument
50 protected void writeCallToInitializing(MutableClass mutableClass, in writeCallToInitializing() argument
53 Type.getMethodDescriptor(OBJECT_TYPE, mutableClass.classType), BOOTSTRAP_INIT); in writeCallToInitializing()
57 protected void generateClassHandlerCall(MutableClass mutableClass, MethodNode originalMethod, in generateClassHandlerCall() argument
59 generateInvokeDynamic(mutableClass, originalMethod, originalMethodName, generator); in generateClassHandlerCall()
63 private void generateInvokeDynamic(MutableClass mutableClass, MethodNode originalMethod, in generateInvokeDynamic() argument
66 new Handle(getTag(originalMethod), mutableClass.classType.getInternalName(), in generateInvokeDynamic()
73 String desc = "(" + mutableClass.classType.getDescriptor() + originalMethod.desc.substring(1); in generateInvokeDynamic()
83 protected void interceptInvokeVirtualMethod(MutableClass mutableClass, in interceptInvokeVirtualMethod() argument
DOldClassInstrumentor.java43 protected void addDirectCallConstructor(MutableClass mutableClass) { in addDirectCallConstructor() argument
45 …"<init>", "(" + DIRECT_OBJECT_MARKER_TYPE_DESC + mutableClass.classType.getDescriptor() + ")V", nu… in addDirectCallConstructor()
48 String superName = mutableClass.classNode.superName; in addDirectCallConstructor()
58 …generator.putField(mutableClass.classType, ShadowConstants.CLASS_HANDLER_DATA_FIELD_NAME, OBJECT_T… in addDirectCallConstructor()
60 mutableClass.addMethod(directCallConstructor); in addDirectCallConstructor()
64 protected void writeCallToInitializing(MutableClass mutableClass, in writeCallToInitializing() argument
70 protected void generateClassHandlerCall(MutableClass mutableClass, MethodNode originalMethod, in generateClassHandlerCall() argument
72 generateCallToClassHandler(mutableClass, originalMethod, originalMethodName, generator); in generateClassHandlerCall()
93 private void generateCallToClassHandler(MutableClass mutableClass, MethodNode originalMethod, in generateCallToClassHandler() argument
95 …decorator.decorateMethodPreClassHandler(mutableClass, originalMethod, originalMethodName, generato… in generateCallToClassHandler()
[all …]
DInstrumentationConfiguration.java82 public boolean shouldInstrument(MutableClass mutableClass) { in shouldInstrument() argument
83 return !(mutableClass.isInterface() in shouldInstrument()
84 || mutableClass.isAnnotation() in shouldInstrument()
85 || mutableClass.hasAnnotation(DoNotInstrument.class)) in shouldInstrument()
86 && (isInInstrumentedPackage(mutableClass.getName()) in shouldInstrument()
87 || instrumentedClasses.contains(mutableClass.getName()) in shouldInstrument()
88 || mutableClass.hasAnnotation(Instrument.class)) in shouldInstrument()
89 && !(classesToNotInstrument.contains(mutableClass.getName())) in shouldInstrument()
90 && !(isInPackagesToNotInstrument(mutableClass.getName())); in shouldInstrument()
DSandboxClassLoader.java120 MutableClass mutableClass = PerfStatsCollector.getInstance().measure("analyze class", in maybeInstrumentClass() local
126 if (config.shouldInstrument(mutableClass)) { in maybeInstrumentClass()
128 () -> classInstrumentor.instrumentToBytes(mutableClass) in maybeInstrumentClass()
131 bytes = postProcessUninstrumentedClass(mutableClass, origClassBytes); in maybeInstrumentClass()
144 MutableClass mutableClass, byte[] origClassBytes) { in postProcessUninstrumentedClass() argument
/external/guava/guava-testlib/test/com/google/common/testing/
DArbitraryInstancesTest.java399 for (Class<?> mutableClass : mutableClasses) { in assertFreshInstanceReturned()
400 Object instance = ArbitraryInstances.get(mutableClass); in assertFreshInstanceReturned()
401 assertNotNull("Expected to return non-null for: " + mutableClass, instance); in assertFreshInstanceReturned()
402 assertNotSame("Expected to return fresh instance for: " + mutableClass, in assertFreshInstanceReturned()
403 instance, ArbitraryInstances.get(mutableClass)); in assertFreshInstanceReturned()