public interface MethodLikeDeclaration extends Declaration, TypeParametrizable, HasAccessLevel
Modifier and Type | Method and Description |
---|---|
ReferenceTypeDeclaration |
declaringType()
The type in which the method is declared.
|
default java.util.Optional<TypeParameterDeclaration> |
findTypeParameter(java.lang.String name)
Find the closest TypeParameterDeclaration with the given name.
|
default ParameterDeclaration |
getLastParam()
Utility method to get the last ParameterDeclaration.
|
int |
getNumberOfParams()
Number of params.
|
ParameterDeclaration |
getParam(int i)
Get the ParameterDeclaration at the corresponding position or throw IllegalArgumentException.
|
default java.lang.String |
getQualifiedName()
The qualified name of the method composed by the qualfied name of the declaring type
followed by a dot and the name of the method.
|
default java.lang.String |
getQualifiedSignature()
The qualified signature of the method.
|
default java.lang.String |
getSignature()
The signature of the method.
|
default boolean |
hasVariadicParameter()
Has the method or construcor a variadic parameter?
Note that when a method has a variadic parameter it should have an array type.
|
asField, asMethod, asParameter, asType, getName, hasName, isField, isMethod, isParameter, isType
getTypeParameters
accessLevel
default java.lang.String getQualifiedName()
default java.lang.String getSignature()
default java.lang.String getQualifiedSignature()
ReferenceTypeDeclaration declaringType()
int getNumberOfParams()
ParameterDeclaration getParam(int i)
default ParameterDeclaration getLastParam()
default boolean hasVariadicParameter()
default java.util.Optional<TypeParameterDeclaration> findTypeParameter(java.lang.String name)
TypeParametrizable
findTypeParameter
in interface TypeParametrizable