@Internal public class JavaMethodElement extends AbstractJavaElement implements MethodElement
ExecutableElement.EMPTY_ELEMENT_ARRAYCLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBEREMPTY| Constructor and Description |
|---|
JavaMethodElement(JavaClassElement declaringClass,
javax.lang.model.element.ExecutableElement executableElement,
AnnotationMetadata annotationMetadata,
JavaVisitorContext visitorContext) |
| Modifier and Type | Method and Description |
|---|---|
ClassElement |
getDeclaringType() |
java.util.Optional<java.lang.String> |
getDocumentation() |
ClassElement |
getGenericReturnType()
The generic return type of the method.
|
ClassElement |
getOwningType()
The owing type is the type that owns this element.
|
ParameterElement[] |
getParameters() |
ClassElement |
getReturnType() |
ParameterElement[] |
getSuspendParameters()
If
MethodElement.isSuspend() returns true this method exposes the continuation parameter in addition to the other parameters of the method. |
boolean |
isDefault()
Is the method a default method on an interfaces.
|
boolean |
isSuspend()
Is the method a Kotlin suspend function.
|
protected io.micronaut.annotation.processing.visitor.JavaParameterElement |
newParameterElement(javax.lang.model.element.VariableElement variableElement,
AnnotationMetadata annotationMetadata)
Creates a new parameter element for the given args.
|
protected ClassElement |
returnType(java.util.Map<java.lang.String,java.util.Map<java.lang.String,javax.lang.model.type.TypeMirror>> info)
The return type for the given info.
|
MethodElement |
withNewParameters(ParameterElement... newParameters)
Takes this method element and transforms into a new method element with the given parameters appended to the existing parameters.
|
annotate, getAnnotationMetadata, getName, getNativeType, isAbstract, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, mirrorToClassElement, mirrorToClassElement, mirrorToClassElement, parameterizedClassElement, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescription, hasParameters, ofannotate, annotate, annotate, annotate, getName, getNativeType, getSimpleName, isAbstract, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStaticbooleanValue, 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, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, 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, hasPropertyExpressions, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypehasDeclaredStereotypeisDeclaredNonNull, isDeclaredNullable, isNonNull, isNullablegetAnnotationMetadatapublic JavaMethodElement(JavaClassElement declaringClass, javax.lang.model.element.ExecutableElement executableElement, AnnotationMetadata annotationMetadata, JavaVisitorContext visitorContext)
declaringClass - The declaring classexecutableElement - The ExecutableElementannotationMetadata - The annotation metadatavisitorContext - The visitor contextpublic boolean isDefault()
MethodElementisDefault in interface MethodElement@NonNull public ClassElement getGenericReturnType()
MethodElementgetGenericReturnType in interface MethodElement@NonNull public ClassElement getReturnType()
getReturnType in interface MethodElementpublic java.util.Optional<java.lang.String> getDocumentation()
getDocumentation in interface Elementpublic boolean isSuspend()
MethodElementisSuspend in interface MethodElementpublic ParameterElement[] getParameters()
getParameters in interface MethodElementpublic MethodElement withNewParameters(ParameterElement... newParameters)
MethodElementwithNewParameters in interface MethodElementnewParameters - The new parameterspublic ParameterElement[] getSuspendParameters()
MethodElementMethodElement.isSuspend() returns true this method exposes the continuation parameter in addition to the other parameters of the method.getSuspendParameters in interface MethodElement@NonNull protected io.micronaut.annotation.processing.visitor.JavaParameterElement newParameterElement(@NonNull javax.lang.model.element.VariableElement variableElement, @NonNull AnnotationMetadata annotationMetadata)
variableElement - The variable elementannotationMetadata - The annotation metadatapublic ClassElement getDeclaringType()
getDeclaringType in interface MemberElementpublic ClassElement getOwningType()
MemberElementMemberElement.getDeclaringType()
in the case of inheritance since this method will return the subclass that owners the inherited member,
whilst MemberElement.getDeclaringType() will return the super class that declares the type.getOwningType in interface MemberElementprotected ClassElement returnType(java.util.Map<java.lang.String,java.util.Map<java.lang.String,javax.lang.model.type.TypeMirror>> info)
info - The info