Class ExecutableMethodsDefinitionWriter
java.lang.Object
io.micronaut.inject.writer.ExecutableMethodsDefinitionWriter
- All Implemented Interfaces:
Buildable<OutputObjectDef>
@NullUnmarked
@Internal
public class ExecutableMethodsDefinitionWriter
extends Object
implements Buildable<OutputObjectDef>
Writes out a
ExecutableMethodsDefinition class.- Since:
- 3.0
- Author:
- Denis Stepanov
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionExecutableMethodsDefinitionWriter(EvaluatedExpressionProcessor evaluatedExpressionProcessor, AnnotationMetadata annotationMetadataWithDefaults, String beanDefinitionClassName, String beanDefinitionReferenceClassName, OriginatingElements originatingElements) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddBridgeMethod(MethodElement methodElement, MethodElement proxyMethod) voidaddExecutableMethod(TypedElement declaringType, MethodElement methodElement) Adds the given method to the executable methods definition.final OutputObjectDefbuild()Invoke to build the class model.final intfindIndexOfExecutableMethod(MethodElement methodElement) io.micronaut.sourcegen.model.ClassTypeDefgetMethodByIndex(int index) Retrieves the `MethodElement` at the specified index.intRetrieves the total count of methods.booleanDoes method support intercepted proxy.booleanBy default, when theBeanContextis started, theExecutableMethodProcessorinstances unless this method returns true.voidsetProxyType(@Nullable io.micronaut.sourcegen.model.ClassTypeDef proxyType)
-
Field Details
-
CLASS_SUFFIX
- See Also:
-
GET_EXECUTABLE_AT_INDEX_METHOD
-
REQUIRES_METHOD_PROCESSING_METHOD
-
-
Constructor Details
-
ExecutableMethodsDefinitionWriter
public ExecutableMethodsDefinitionWriter(EvaluatedExpressionProcessor evaluatedExpressionProcessor, AnnotationMetadata annotationMetadataWithDefaults, String beanDefinitionClassName, String beanDefinitionReferenceClassName, OriginatingElements originatingElements)
-
-
Method Details
-
requiresMethodProcessing
public boolean requiresMethodProcessing()By default, when theBeanContextis started, theExecutableMethodProcessorinstances unless this method returns true.- Returns:
- Whether the bean definition requires method processing
- See Also:
-
setProxyType
public void setProxyType(@Nullable io.micronaut.sourcegen.model.ClassTypeDef proxyType) - Parameters:
proxyType- The proxy type
-
getClassName
- Returns:
- The generated class name.
-
getClassTypeDef
public io.micronaut.sourcegen.model.ClassTypeDef getClassTypeDef()- Returns:
- The generated class type.
-
isSupportsInterceptedProxy
public boolean isSupportsInterceptedProxy()Does method support intercepted proxy.- Returns:
- Does method support intercepted proxy
-
addExecutableMethod
Adds the given method to the executable methods definition.- Parameters:
declaringType- The declaring typemethodElement- The method element
-
addBridgeMethod
-
findIndexOfExecutableMethod
-
build
Invoke to build the class model.- Specified by:
buildin interfaceBuildable<OutputObjectDef>- Returns:
- The builder result
-
getMethodsCount
public int getMethodsCount()Retrieves the total count of methods.- Returns:
- The number of methods available.
- Since:
- 5.0
-
getMethodByIndex
Retrieves the `MethodElement` at the specified index.- Parameters:
index- The index of the method to retrieve.- Returns:
- The `MethodElement` corresponding to the specified index.
- Since:
- 5.0
-