Class DispatchWriter

    • Constructor Detail

      • DispatchWriter

        public DispatchWriter​(org.objectweb.asm.Type thisType)
      • DispatchWriter

        public DispatchWriter​(org.objectweb.asm.Type thisType,
                              org.objectweb.asm.Type dispatchSuperType)
    • Method Detail

      • addSetField

        public int addSetField​(FieldElement beanField)
        Adds new set field dispatch target.
        Parameters:
        beanField - The field
        Returns:
        the target index
      • addGetField

        public int addGetField​(FieldElement beanField)
        Adds new get field dispatch target.
        Parameters:
        beanField - The field
        Returns:
        the target index
      • addMethod

        public int addMethod​(TypedElement declaringType,
                             MethodElement methodElement)
        Adds new method dispatch target.
        Parameters:
        declaringType - The declaring type
        methodElement - The method element
        Returns:
        the target index
      • addMethod

        public int addMethod​(TypedElement declaringType,
                             MethodElement methodElement,
                             boolean useOneDispatch)
        Adds new method dispatch target.
        Parameters:
        declaringType - The declaring type
        methodElement - The method element
        useOneDispatch - If method should be dispatched using "dispatchOne"
        Returns:
        the target index
      • addInterceptedMethod

        public int addInterceptedMethod​(TypedElement declaringType,
                                        MethodElement methodElement,
                                        java.lang.String interceptedProxyClassName,
                                        java.lang.String interceptedProxyBridgeMethodName)
        Adds new interceptable method dispatch target.
        Parameters:
        declaringType - The declaring type
        methodElement - The method element
        interceptedProxyClassName - The interceptedProxyClassName
        interceptedProxyBridgeMethodName - The interceptedProxyBridgeMethodName
        Returns:
        the target index
      • addDispatchTarget

        public int addDispatchTarget​(DispatchWriter.DispatchTarget dispatchTarget)
        Adds new custom dispatch target.
        Parameters:
        dispatchTarget - The dispatch target implementation
        Returns:
        the target index
      • buildDispatchMethod

        public void buildDispatchMethod​(org.objectweb.asm.ClassWriter classWriter)
        Build dispatch method if needed.
        Parameters:
        classWriter - The classwriter
      • buildDispatchOneMethod

        public void buildDispatchOneMethod​(org.objectweb.asm.ClassWriter classWriter)
        Build dispatch one method if needed.
        Parameters:
        classWriter - The classwriter
      • buildGetTargetMethodByIndex

        public void buildGetTargetMethodByIndex​(org.objectweb.asm.ClassWriter classWriter)
        Build get target method by index method if needed.
        Parameters:
        classWriter - The classwriter
      • pushTypeUtilsGetRequiredMethod

        public static void pushTypeUtilsGetRequiredMethod​(org.objectweb.asm.commons.GeneratorAdapter builder,
                                                          org.objectweb.asm.Type declaringTypeObject,
                                                          MethodElement methodElement)
      • isHasInterceptedMethod

        public boolean isHasInterceptedMethod()
        Returns:
        if intercepted method dispatch have been added