Class SubclassBytecodeGenerator
java.lang.Object
org.mockito.internal.creation.bytebuddy.SubclassBytecodeGenerator
- All Implemented Interfaces:
BytecodeGenerator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final net.bytebuddy.ByteBuddyprivate static final Stringprivate final net.bytebuddy.implementation.Implementationprivate final net.bytebuddy.implementation.Implementationprivate final ModuleHandlerprivate final net.bytebuddy.implementation.Implementationprivate final SubclassLoaderprivate final net.bytebuddy.matcher.ElementMatcher<? super net.bytebuddy.description.method.MethodDescription> private final net.bytebuddy.implementation.Implementationprivate final net.bytebuddy.implementation.Implementation -
Constructor Summary
ConstructorsModifierConstructorDescriptionSubclassBytecodeGenerator(net.bytebuddy.implementation.Implementation readReplace, net.bytebuddy.matcher.ElementMatcher<? super net.bytebuddy.description.method.MethodDescription> matcher) protectedSubclassBytecodeGenerator(SubclassLoader loader, net.bytebuddy.implementation.Implementation readReplace, net.bytebuddy.matcher.ElementMatcher<? super net.bytebuddy.description.method.MethodDescription> matcher) -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidassertVisibility(Class<?> type) private static booleanhasNonPublicTypeReference(Class<?> iface) private booleanisComingFromJDK(Class<?> type) <T> Class<? extends T> mockClass(MockFeatures<T> features) voidmockClassConstruction(Class<?> type) voidmockClassStatic(Class<?> type) private static booleanneedsSamePackageClassLoader(MockFeatures<?> features) private static Collection<? extends Type> sortedSerializable(Collection<Class<?>> interfaces, Class<?> mockedType) private static CharSequencesuffix(MockFeatures<?> features) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BytecodeGenerator
clearAllCaches
-
Field Details
-
CODEGEN_PACKAGE
- See Also:
-
loader
-
handler
-
byteBuddy
private final net.bytebuddy.ByteBuddy byteBuddy -
readReplace
private final net.bytebuddy.implementation.Implementation readReplace -
matcher
private final net.bytebuddy.matcher.ElementMatcher<? super net.bytebuddy.description.method.MethodDescription> matcher -
dispatcher
private final net.bytebuddy.implementation.Implementation dispatcher -
hashCode
private final net.bytebuddy.implementation.Implementation hashCode -
equals
private final net.bytebuddy.implementation.Implementation equals -
writeReplace
private final net.bytebuddy.implementation.Implementation writeReplace
-
-
Constructor Details
-
SubclassBytecodeGenerator
public SubclassBytecodeGenerator() -
SubclassBytecodeGenerator
-
SubclassBytecodeGenerator
public SubclassBytecodeGenerator(net.bytebuddy.implementation.Implementation readReplace, net.bytebuddy.matcher.ElementMatcher<? super net.bytebuddy.description.method.MethodDescription> matcher) -
SubclassBytecodeGenerator
protected SubclassBytecodeGenerator(SubclassLoader loader, net.bytebuddy.implementation.Implementation readReplace, net.bytebuddy.matcher.ElementMatcher<? super net.bytebuddy.description.method.MethodDescription> matcher)
-
-
Method Details
-
needsSamePackageClassLoader
-
hasNonPublicTypeReference
-
mockClass
- Specified by:
mockClassin interfaceBytecodeGenerator
-
suffix
-
sortedSerializable
private static Collection<? extends Type> sortedSerializable(Collection<Class<?>> interfaces, Class<?> mockedType) -
mockClassStatic
- Specified by:
mockClassStaticin interfaceBytecodeGenerator
-
mockClassConstruction
- Specified by:
mockClassConstructionin interfaceBytecodeGenerator
-
isComingFromJDK
-
assertVisibility
-