@Internal public abstract class AbstractExecutableMethod extends java.lang.Object implements ExecutableMethod, EnvironmentConfigurable
Abstract base class for generated ExecutableMethod classes to implement. The generated classes should
implement the Executable.invoke(Object, Object...) method at compile time providing direct dispatch
of the target method
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Class[] |
argTypes |
protected java.lang.Class |
declaringType |
protected java.lang.String |
methodName |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractExecutableMethod(java.lang.Class<?> declaringType,
java.lang.String methodName) |
protected |
AbstractExecutableMethod(java.lang.Class<?> declaringType,
java.lang.String methodName,
io.micronaut.core.type.Argument genericReturnType) |
protected |
AbstractExecutableMethod(java.lang.Class<?> declaringType,
java.lang.String methodName,
io.micronaut.core.type.Argument genericReturnType,
io.micronaut.core.type.Argument... arguments) |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Environment environment)
Configure the component for the given environment.
|
boolean |
equals(java.lang.Object o) |
io.micronaut.core.annotation.AnnotationMetadata |
getAnnotationMetadata() |
io.micronaut.core.type.Argument<?>[] |
getArguments() |
java.lang.Class[] |
getArgumentTypes() |
java.lang.Class |
getDeclaringType() |
java.lang.String |
getMethodName() |
io.micronaut.core.type.ReturnType |
getReturnType() |
java.lang.reflect.Method |
getTargetMethod()
Soft resolves the target
Method avoiding reflection until as late as possible. |
int |
hashCode() |
boolean |
hasPropertyExpressions() |
java.lang.Object |
invoke(java.lang.Object instance,
java.lang.Object... arguments) |
protected abstract java.lang.Object |
invokeInternal(java.lang.Object instance,
java.lang.Object[] arguments) |
protected io.micronaut.core.annotation.AnnotationMetadata |
resolveAnnotationMetadata()
Resolves the annotation metadata for this method.
|
protected java.lang.reflect.Method |
resolveTargetMethod()
Resolves the target method.
|
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDescription, getDescription, isAbstract, isSuspendgetArgumentNames, getArguments, getName, getTargetMethodbooleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, enumValues, enumValues, enumValues, enumValues, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeprotected final java.lang.Class declaringType
protected final java.lang.String methodName
protected final java.lang.Class[] argTypes
protected AbstractExecutableMethod(java.lang.Class<?> declaringType,
java.lang.String methodName,
io.micronaut.core.type.Argument genericReturnType,
io.micronaut.core.type.Argument... arguments)
declaringType - The declaring typemethodName - The method namegenericReturnType - The generic return typearguments - The argumentsprotected AbstractExecutableMethod(java.lang.Class<?> declaringType,
java.lang.String methodName,
io.micronaut.core.type.Argument genericReturnType)
declaringType - The declaring typemethodName - The method namegenericReturnType - The generic return typeprotected AbstractExecutableMethod(java.lang.Class<?> declaringType,
java.lang.String methodName)
declaringType - The declaring typemethodName - The method namepublic boolean hasPropertyExpressions()
hasPropertyExpressions in interface EnvironmentConfigurablehasPropertyExpressions in interface io.micronaut.core.annotation.AnnotationMetadatahasPropertyExpressions in interface io.micronaut.core.annotation.AnnotationMetadataDelegatepublic io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()
getAnnotationMetadata in interface io.micronaut.core.annotation.AnnotationMetadataProviderpublic void configure(Environment environment)
EnvironmentConfigurableconfigure in interface EnvironmentConfigurableenvironment - The environmentpublic boolean equals(java.lang.Object o)
public int hashCode()
public java.lang.String toString()
toString in class java.lang.Objectpublic io.micronaut.core.type.ReturnType getReturnType()
getReturnType in interface MethodReferencepublic java.lang.Class[] getArgumentTypes()
getArgumentTypes in interface MethodReferencepublic java.lang.Class getDeclaringType()
getDeclaringType in interface io.micronaut.core.type.ExecutablegetDeclaringType in interface MethodReferencepublic java.lang.String getMethodName()
getMethodName in interface MethodReferencepublic final java.lang.Object invoke(java.lang.Object instance,
java.lang.Object... arguments)
invoke in interface io.micronaut.core.type.Executableprotected abstract java.lang.Object invokeInternal(java.lang.Object instance,
java.lang.Object[] arguments)
instance - The instancearguments - The argumentsprotected io.micronaut.core.annotation.AnnotationMetadata resolveAnnotationMetadata()
AnnotationMetadatapublic io.micronaut.core.type.Argument<?>[] getArguments()
getArguments in interface io.micronaut.core.type.Executablepublic final java.lang.reflect.Method getTargetMethod()
Method avoiding reflection until as late as possible.java.lang.NoSuchMethodError - if the method doesn't exist@NonNull protected java.lang.reflect.Method resolveTargetMethod()