Class BeanGenerator

java.lang.Object
io.quarkus.arc.processor.BeanGenerator
Direct Known Subclasses:
DecoratorGenerator, InterceptorGenerator

public class BeanGenerator extends Object
Author:
Martin Kouba
  • Field Details

    • FIELD_NAME_DECLARING_PROVIDER_SUPPLIER

      protected static final String FIELD_NAME_DECLARING_PROVIDER_SUPPLIER
      See Also:
    • FIELD_NAME_BEAN_TYPES

      protected static final String FIELD_NAME_BEAN_TYPES
      See Also:
    • FIELD_NAME_QUALIFIERS

      protected static final String FIELD_NAME_QUALIFIERS
      See Also:
    • FIELD_NAME_STEREOTYPES

      protected static final String FIELD_NAME_STEREOTYPES
      See Also:
    • FIELD_NAME_PROXY

      protected static final String FIELD_NAME_PROXY
      See Also:
    • annotationLiterals

      protected final AnnotationLiteralProcessor annotationLiterals
    • applicationClassPredicate

      protected final Predicate<org.jboss.jandex.DotName> applicationClassPredicate
    • privateMembers

      protected final io.quarkus.arc.processor.BeanProcessor.PrivateMembersCollector privateMembers
    • existingClasses

      protected final Set<String> existingClasses
    • beanToGeneratedName

      protected final Map<BeanInfo,String> beanToGeneratedName
    • beanToGeneratedBaseName

      protected final Map<BeanInfo,String> beanToGeneratedBaseName
    • injectionPointAnnotationsPredicate

      protected final Predicate<org.jboss.jandex.DotName> injectionPointAnnotationsPredicate
    • suppressConditionGenerators

      protected final List<Function<BeanInfo,Consumer<io.quarkus.gizmo.BytecodeCreator>>> suppressConditionGenerators
    • generateSources

      protected final boolean generateSources
    • reflectionRegistration

      protected final ReflectionRegistration reflectionRegistration
  • Constructor Details

  • Method Details

    • initMaps

      protected void initMaps(BeanInfo bean, Map<InjectionPointInfo,String> injectionPointToProvider, Map<InterceptorInfo,String> interceptorToProvider, Map<DecoratorInfo,String> decoratorToProvider)
    • createProviderFields

      protected void createProviderFields(io.quarkus.gizmo.ClassCreator beanCreator, BeanInfo bean, Map<InjectionPointInfo,String> injectionPointToProviderSupplier, Map<InterceptorInfo,String> interceptorToProviderSupplier, Map<DecoratorInfo,String> decoratorToProviderSupplier)
    • createConstructor

      protected void createConstructor(io.quarkus.gizmo.ClassOutput classOutput, io.quarkus.gizmo.ClassCreator beanCreator, BeanInfo bean, Map<InjectionPointInfo,String> injectionPointToProviderField, Map<InterceptorInfo,String> interceptorToProviderField, Map<DecoratorInfo,String> decoratorToProviderSupplierField, AnnotationLiteralProcessor annotationLiterals, ReflectionRegistration reflectionRegistration)
    • initConstructor

      protected io.quarkus.gizmo.MethodCreator initConstructor(io.quarkus.gizmo.ClassOutput classOutput, io.quarkus.gizmo.ClassCreator beanCreator, BeanInfo bean, Map<InjectionPointInfo,String> injectionPointToProviderField, Map<InterceptorInfo,String> interceptorToProviderField, Map<DecoratorInfo,String> decoratorToProviderSupplierField, AnnotationLiteralProcessor annotationLiterals, ReflectionRegistration reflectionRegistration)
    • implementDestroy

      protected void implementDestroy(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator, io.quarkus.arc.processor.BeanGenerator.ProviderType providerType, Map<InjectionPointInfo,String> injectionPointToProviderField, boolean isApplicationClass, String baseName, String targetPackage)
    • implementCreate

      protected void implementCreate(io.quarkus.gizmo.ClassOutput classOutput, io.quarkus.gizmo.ClassCreator beanCreator, BeanInfo bean, io.quarkus.arc.processor.BeanGenerator.ProviderType providerType, String baseName, Map<InjectionPointInfo,String> injectionPointToProviderSupplierField, Map<InterceptorInfo,String> interceptorToProviderSupplierField, Map<DecoratorInfo,String> decoratorToProviderSupplierField, String targetPackage, boolean isApplicationClass)
    • implementGet

      protected void implementGet(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator, io.quarkus.arc.processor.BeanGenerator.ProviderType providerType, String baseName)
    • implementGetTypes

      protected void implementGetTypes(io.quarkus.gizmo.ClassCreator beanCreator, io.quarkus.gizmo.FieldDescriptor typesField)
      Parameters:
      beanCreator -
      See Also:
    • implementGetScope

      protected void implementGetScope(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator)
      Parameters:
      bean -
      beanCreator -
      See Also:
    • implementGetIdentifier

      protected void implementGetIdentifier(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator)
      Parameters:
      bean -
      beanCreator -
      See Also:
    • implementEquals

      protected void implementEquals(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator)
    • implementHashCode

      protected void implementHashCode(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator)
    • implementToString

      protected void implementToString(io.quarkus.gizmo.ClassCreator beanCreator)
    • implementGetQualifiers

      protected void implementGetQualifiers(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator, io.quarkus.gizmo.FieldDescriptor qualifiersField)
      Parameters:
      bean -
      beanCreator -
      qualifiersField -
      See Also:
    • implementGetDeclaringBean

      protected void implementGetDeclaringBean(io.quarkus.gizmo.ClassCreator beanCreator)
    • implementIsAlternative

      protected void implementIsAlternative(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator)
    • implementGetPriority

      protected void implementGetPriority(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator)
    • implementIsDefaultBean

      protected void implementIsDefaultBean(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator)
    • implementGetStereotypes

      protected void implementGetStereotypes(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator, io.quarkus.gizmo.FieldDescriptor stereotypesField)
    • implementGetBeanClass

      protected void implementGetBeanClass(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator)
    • implementGetImplementationClass

      protected void implementGetImplementationClass(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator)
    • implementGetName

      protected void implementGetName(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator)
    • implementGetKind

      protected void implementGetKind(io.quarkus.gizmo.ClassCreator beanCreator, InjectableBean.Kind kind)
    • implementSupplierGet

      protected void implementSupplierGet(io.quarkus.gizmo.ClassCreator beanCreator)
    • implementIsSuppressed

      protected void implementIsSuppressed(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator)
    • getJavaMemberHandle

      public static io.quarkus.gizmo.ResultHandle getJavaMemberHandle(io.quarkus.gizmo.MethodCreator bytecode, InjectionPointInfo injectionPoint, ReflectionRegistration reflectionRegistration)
    • collectInjectionPointAnnotations

      public static io.quarkus.gizmo.ResultHandle collectInjectionPointAnnotations(BeanDeployment beanDeployment, io.quarkus.gizmo.MethodCreator bytecode, InjectionPointInfo injectionPoint, AnnotationLiteralProcessor annotationLiterals, Predicate<org.jboss.jandex.DotName> injectionPointAnnotationsPredicate)
    • collectInjectionPointQualifiers

      public static io.quarkus.gizmo.ResultHandle collectInjectionPointQualifiers(BeanDeployment beanDeployment, io.quarkus.gizmo.MethodCreator bytecode, InjectionPointInfo injectionPoint, AnnotationLiteralProcessor annotationLiterals)
    • collectQualifiers

      public static io.quarkus.gizmo.ResultHandle collectQualifiers(BeanDeployment beanDeployment, io.quarkus.gizmo.MethodCreator bytecode, AnnotationLiteralProcessor annotationLiterals, Set<org.jboss.jandex.AnnotationInstance> qualifiers)
    • getBaseName

      protected String getBaseName(BeanInfo bean, String beanClassName)
    • isReflectionFallbackNeeded

      protected boolean isReflectionFallbackNeeded(org.jboss.jandex.MethodInfo method, String targetPackage)
    • isReflectionFallbackNeeded

      protected boolean isReflectionFallbackNeeded(org.jboss.jandex.FieldInfo field, String targetPackage, BeanInfo bean)
    • isPackagePrivate

      protected boolean isPackagePrivate(int mod)