Package io.quarkus.arc.processor
Class BeanGenerator
java.lang.Object
io.quarkus.arc.processor.BeanGenerator
- Direct Known Subclasses:
DecoratorGenerator,InterceptorGenerator
- Author:
- Martin Kouba
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AnnotationLiteralProcessorprotected final Predicate<org.jboss.jandex.DotName>protected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected final booleanprotected final Predicate<org.jboss.jandex.DotName>protected final io.quarkus.arc.processor.BeanProcessor.PrivateMembersCollectorprotected final ReflectionRegistration -
Constructor Summary
ConstructorsConstructorDescriptionBeanGenerator(AnnotationLiteralProcessor annotationLiterals, Predicate<org.jboss.jandex.DotName> applicationClassPredicate, io.quarkus.arc.processor.BeanProcessor.PrivateMembersCollector privateMembers, boolean generateSources, ReflectionRegistration reflectionRegistration, Set<String> existingClasses, Map<BeanInfo, String> beanToGeneratedName, Predicate<org.jboss.jandex.DotName> injectionPointAnnotationsPredicate, List<Function<BeanInfo, Consumer<io.quarkus.gizmo.BytecodeCreator>>> suppressConditionGenerators) -
Method Summary
Modifier and TypeMethodDescriptionstatic io.quarkus.gizmo.ResultHandlecollectInjectionPointAnnotations(BeanDeployment beanDeployment, io.quarkus.gizmo.MethodCreator bytecode, InjectionPointInfo injectionPoint, AnnotationLiteralProcessor annotationLiterals, Predicate<org.jboss.jandex.DotName> injectionPointAnnotationsPredicate) static io.quarkus.gizmo.ResultHandlecollectInjectionPointQualifiers(BeanDeployment beanDeployment, io.quarkus.gizmo.MethodCreator bytecode, InjectionPointInfo injectionPoint, AnnotationLiteralProcessor annotationLiterals) static io.quarkus.gizmo.ResultHandlecollectQualifiers(BeanDeployment beanDeployment, io.quarkus.gizmo.MethodCreator bytecode, AnnotationLiteralProcessor annotationLiterals, Set<org.jboss.jandex.AnnotationInstance> qualifiers) protected voidcreateConstructor(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) protected voidcreateProviderFields(io.quarkus.gizmo.ClassCreator beanCreator, BeanInfo bean, Map<InjectionPointInfo, String> injectionPointToProviderSupplier, Map<InterceptorInfo, String> interceptorToProviderSupplier, Map<DecoratorInfo, String> decoratorToProviderSupplier) protected StringgetBaseName(String beanClassName) static io.quarkus.gizmo.ResultHandlegetJavaMemberHandle(io.quarkus.gizmo.MethodCreator bytecode, InjectionPointInfo injectionPoint, ReflectionRegistration reflectionRegistration) protected voidimplementCreate(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) protected voidimplementDestroy(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator, io.quarkus.arc.processor.BeanGenerator.ProviderType providerType, Map<InjectionPointInfo, String> injectionPointToProviderField, boolean isApplicationClass, String baseName, String targetPackage) protected voidimplementEquals(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator) protected voidimplementGet(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator, io.quarkus.arc.processor.BeanGenerator.ProviderType providerType, String baseName) protected voidimplementGetBeanClass(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator) protected voidimplementGetDeclaringBean(io.quarkus.gizmo.ClassCreator beanCreator) protected voidimplementGetIdentifier(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator) protected voidimplementGetImplementationClass(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator) protected voidimplementGetKind(io.quarkus.gizmo.ClassCreator beanCreator, InjectableBean.Kind kind) protected voidimplementGetName(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator) protected voidimplementGetPriority(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator) protected voidimplementGetQualifiers(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator, io.quarkus.gizmo.FieldDescriptor qualifiersField) protected voidimplementGetScope(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator) protected voidimplementGetStereotypes(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator, io.quarkus.gizmo.FieldDescriptor stereotypesField) protected voidimplementGetTypes(io.quarkus.gizmo.ClassCreator beanCreator, io.quarkus.gizmo.FieldDescriptor typesField) protected voidimplementHashCode(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator) protected voidimplementIsAlternative(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator) protected voidimplementIsDefaultBean(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator) protected voidimplementIsSuppressed(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator) protected voidimplementSupplierGet(io.quarkus.gizmo.ClassCreator beanCreator) protected voidimplementToString(io.quarkus.gizmo.ClassCreator beanCreator) protected io.quarkus.gizmo.MethodCreatorinitConstructor(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) protected voidinitMaps(BeanInfo bean, Map<InjectionPointInfo, String> injectionPointToProvider, Map<InterceptorInfo, String> interceptorToProvider, Map<DecoratorInfo, String> decoratorToProvider) protected booleanisPackagePrivate(int mod) protected booleanisReflectionFallbackNeeded(org.jboss.jandex.FieldInfo field, String targetPackage, BeanInfo bean) protected booleanisReflectionFallbackNeeded(org.jboss.jandex.MethodInfo method, String targetPackage)
-
Field Details
-
FIELD_NAME_DECLARING_PROVIDER_SUPPLIER
- See Also:
-
FIELD_NAME_BEAN_TYPES
- See Also:
-
FIELD_NAME_QUALIFIERS
- See Also:
-
FIELD_NAME_STEREOTYPES
- See Also:
-
FIELD_NAME_PROXY
- See Also:
-
annotationLiterals
-
applicationClassPredicate
-
privateMembers
protected final io.quarkus.arc.processor.BeanProcessor.PrivateMembersCollector privateMembers -
existingClasses
-
beanToGeneratedName
-
beanToGeneratedBaseName
-
injectionPointAnnotationsPredicate
-
suppressConditionGenerators
-
generateSources
protected final boolean generateSources -
reflectionRegistration
-
-
Constructor Details
-
BeanGenerator
public BeanGenerator(AnnotationLiteralProcessor annotationLiterals, Predicate<org.jboss.jandex.DotName> applicationClassPredicate, io.quarkus.arc.processor.BeanProcessor.PrivateMembersCollector privateMembers, boolean generateSources, ReflectionRegistration reflectionRegistration, Set<String> existingClasses, Map<BeanInfo, String> beanToGeneratedName, Predicate<org.jboss.jandex.DotName> injectionPointAnnotationsPredicate, List<Function<BeanInfo, Consumer<io.quarkus.gizmo.BytecodeCreator>>> suppressConditionGenerators)
-
-
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
-
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
-
implementGetTypes
protected void implementGetTypes(io.quarkus.gizmo.ClassCreator beanCreator, io.quarkus.gizmo.FieldDescriptor typesField) - Parameters:
beanCreator-- See Also:
-
implementGetScope
- Parameters:
bean-beanCreator-- See Also:
-
implementGetIdentifier
- Parameters:
bean-beanCreator-- See Also:
-
implementEquals
-
implementHashCode
-
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
-
implementGetPriority
-
implementIsDefaultBean
-
implementGetStereotypes
protected void implementGetStereotypes(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator, io.quarkus.gizmo.FieldDescriptor stereotypesField) -
implementGetBeanClass
-
implementGetImplementationClass
protected void implementGetImplementationClass(BeanInfo bean, io.quarkus.gizmo.ClassCreator beanCreator) -
implementGetName
-
implementGetKind
protected void implementGetKind(io.quarkus.gizmo.ClassCreator beanCreator, InjectableBean.Kind kind) -
implementSupplierGet
protected void implementSupplierGet(io.quarkus.gizmo.ClassCreator beanCreator) -
implementIsSuppressed
-
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
-
isReflectionFallbackNeeded
protected boolean isReflectionFallbackNeeded(org.jboss.jandex.MethodInfo method, String targetPackage) -
isReflectionFallbackNeeded
-
isPackagePrivate
protected boolean isPackagePrivate(int mod)
-