public interface MethodElement extends MemberElement
EMPTY_ELEMENT_ARRAY
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
EMPTY
Modifier and Type | Method and Description |
---|---|
default java.lang.String |
getDescription(boolean simple)
Get the method description.
|
default ClassElement |
getGenericReturnType()
The generic return type of the method.
|
ParameterElement[] |
getParameters() |
ClassElement |
getReturnType() |
default ParameterElement[] |
getSuspendParameters()
If
isSuspend() returns true this method exposes the continuation parameter in addition to the other parameters of the method. |
default boolean |
hasParameters()
Returns true if the method has parameters.
|
default boolean |
isDefault()
Is the method a default method on an interfaces.
|
default boolean |
isSuspend()
Is the method a Kotlin suspend function.
|
static MethodElement |
of(ClassElement declaredType,
AnnotationMetadata annotationMetadata,
ClassElement returnType,
ClassElement genericReturnType,
java.lang.String name,
ParameterElement... parameterElements)
Creates a
MethodElement for the given parameters. |
MethodElement |
withNewParameters(ParameterElement... newParameters)
Takes this method element and transforms into a new method element with the given parameters appended to the existing parameters.
|
getDeclaringType, getOwningType
annotate, annotate, annotate, annotate, getDocumentation, getName, getNativeType, getSimpleName, isAbstract, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
booleanValue, 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, 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, synthesizeDeclaredAnnotationsByType
hasDeclaredStereotype
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable
getAnnotationMetadata
@NonNull ClassElement getReturnType()
@NonNull ParameterElement[] getParameters()
@NonNull MethodElement withNewParameters(@NonNull ParameterElement... newParameters)
newParameters
- The new parameters@NonNull default ParameterElement[] getSuspendParameters()
isSuspend()
returns true this method exposes the continuation parameter in addition to the other parameters of the method.default boolean hasParameters()
default boolean isSuspend()
default boolean isDefault()
@NonNull default ClassElement getGenericReturnType()
@NonNull default java.lang.String getDescription(boolean simple)
simple
- If simple type names are to be used@NonNull static MethodElement of(@NonNull ClassElement declaredType, @NonNull AnnotationMetadata annotationMetadata, @NonNull ClassElement returnType, @NonNull ClassElement genericReturnType, @NonNull java.lang.String name, ParameterElement... parameterElements)
MethodElement
for the given parameters.declaredType
- The declaring typeannotationMetadata
- The annotation metadatareturnType
- The return typegenericReturnType
- The generic return typename
- The nameparameterElements
- The parameter elements