Class CodeGenProjectionProvider
java.lang.Object
net.binis.codegen.projection.provider.CodeGenProjectionProvider
- All Implemented Interfaces:
net.binis.codegen.factory.ProjectionProvider,net.binis.codegen.factory.ProxyProvider
public class CodeGenProjectionProvider
extends Object
implements net.binis.codegen.factory.ProjectionProvider, net.binis.codegen.factory.ProxyProvider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcalcDescriptor(Class<?>[] types, Class<?> returnType) protected StringcalcGetterName(String value) protected net.bytebuddy.dynamic.DynamicType.Builder<?>checkPath(net.bytebuddy.dynamic.DynamicType.Builder<?> type, Class<?> cls, Method mtd, String desc, Class<?>[] types, Class<?> ret, boolean isVoid) net.binis.codegen.factory.ProjectionInstantiationprotected Constructor<?>createObject(Class<?> cls, Class<?>[] projections) protected Class<?>createProjectionClass(Class<?> cls, Class<?>[] projections) protected static voiddefaultReturn(net.bytebuddy.jar.asm.MethodVisitor methodVisitor, Class<?> ret) protected MethodfindMethod(Class<?> cls, String name, Class<?>[] types) protected booleanprotected intgetLoadOffset(Class<?> type) protected intgetLoadOpcode(Class<?> type) protected chargetPrimitiveDescriptor(Class<?> type) getReturnOpcode(Class<?> type) protected net.bytebuddy.dynamic.DynamicType.Builder<?>handleCustomClassProjection(net.bytebuddy.dynamic.DynamicType.Builder<?> type, Method mtd, Method m, String desc, Class<?>[] types, Class<?> ret, Type[] generics) protected net.bytebuddy.dynamic.DynamicType.Builder<?>handleDeclaredMethod(net.bytebuddy.dynamic.DynamicType.Builder<?> type, Method mtd, Method m, String desc, Class<?>[] types, Class<?> ret) protected net.bytebuddy.dynamic.DynamicType.Builder<?>handleInterface(net.bytebuddy.dynamic.DynamicType.Builder<?> type, Class<?> cls, Class<?> intf, String desc, Map<String, List<Class<?>[]>> methods) protected net.bytebuddy.dynamic.DynamicType.Builder<?>handleMethod(net.bytebuddy.dynamic.DynamicType.Builder<?> type, Class<?> cls, Method mtd, String desc, Map<String, List<Class<?>[]>> methods) protected net.bytebuddy.dynamic.DynamicType.Builder<?>handlePath(net.bytebuddy.dynamic.DynamicType.Builder<?> type, Class<?> cls, Method mtd, String desc, Class<?>[] types, Class<?> ret, boolean isVoid, Deque<Method> path) protected net.bytebuddy.dynamic.DynamicType.Builder<?>handleProjection(net.bytebuddy.dynamic.DynamicType.Builder<?> type, Method mtd, Method m, String desc, Class<?>[] types, Class<?> ret) protected net.bytebuddy.dynamic.DynamicType.Builder<?>handleUndeclaredMethod(net.bytebuddy.dynamic.DynamicType.Builder<?> type, Method mtd, Class<?>[] types, Class<?> ret, boolean isVoid) protected intloadOffset(Class<?>[] types) protected intloadParams(net.bytebuddy.jar.asm.MethodVisitor methodVisitor, Class<?>[] types) protected booleanmultiple(InvocationHandler handler, Class... cls) protected booleanneedProjection(Type[] generics, Type[] original) protected booleanparamsMatch(Class<?>[] types, Class<?>[] t) proxy(Class cls, InvocationHandler handler)
-
Field Details
-
PROXY_BASE
- See Also:
-
OBJECT_DESC
- See Also:
-
FIELD_NAME
- See Also:
-
proxies
-
-
Constructor Details
-
CodeGenProjectionProvider
public CodeGenProjectionProvider()
-
-
Method Details
-
create
public net.binis.codegen.factory.ProjectionInstantiation create(Class<?> cls, Class<?>... projections) - Specified by:
createin interfacenet.binis.codegen.factory.ProjectionProvider
-
createObject
-
createProjectionClass
-
handleInterface
-
handleMethod
-
handleUndeclaredMethod
-
handleDeclaredMethod
-
handlePath
-
handleProjection
-
handleCustomClassProjection
-
needProjection
-
calcDescriptor
-
getPrimitiveDescriptor
-
getLoadOpcode
-
getReturnOpcode
-
getLoadOffset
-
loadParams
-
loadOffset
-
methodExists
-
paramsMatch
-
checkPath
-
findMethod
protected Method findMethod(Class<?> cls, String name, Class<?>[] types) throws NoSuchMethodException - Throws:
NoSuchMethodException
-
findStartMethod
-
calcGetterName
-
defaultReturn
protected static void defaultReturn(net.bytebuddy.jar.asm.MethodVisitor methodVisitor, Class<?> ret) -
proxy
- Specified by:
proxyin interfacenet.binis.codegen.factory.ProxyProvider
-
multiple
- Specified by:
multiplein interfacenet.binis.codegen.factory.ProxyProvider
-