public interface ResolvedMethodLikeDeclaration extends ResolvedDeclaration, ResolvedTypeParametrizable, HasAccessSpecifier
| Modifier and Type | Method and Description |
|---|---|
ResolvedReferenceTypeDeclaration |
declaringType()
The type in which the method is declared.
|
default Optional<ResolvedTypeParameterDeclaration> |
findTypeParameter(String name)
Find the closest TypeParameterDeclaration with the given name.
|
default String |
getClassName()
The class(es) wrapping the declaring type.
|
default ResolvedParameterDeclaration |
getLastParam()
Utility method to get the last ParameterDeclaration.
|
int |
getNumberOfParams()
Number of params.
|
int |
getNumberOfSpecifiedExceptions()
Number of exceptions listed in the throws clause.
|
default String |
getPackageName()
The package name of the declaring type.
|
ResolvedParameterDeclaration |
getParam(int i)
Get the ParameterDeclaration at the corresponding position or throw IllegalArgumentException.
|
default 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 String |
getQualifiedSignature()
The qualified signature of the method.
|
default String |
getSignature()
The signature of the method.
|
ResolvedType |
getSpecifiedException(int index)
Type of the corresponding entry in the throws clause.
|
default List<ResolvedType> |
getSpecifiedExceptions() |
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.
|
asEnumConstant, asField, asMethod, asParameter, asType, getName, hasName, isEnumConstant, isField, isMethod, isParameter, isType, isVariablegetTypeParameters, isGenericaccessSpecifierdefault String getPackageName()
default String getClassName()
default String getQualifiedName()
default String getSignature()
default String getQualifiedSignature()
ResolvedReferenceTypeDeclaration declaringType()
int getNumberOfParams()
ResolvedParameterDeclaration getParam(int i)
default ResolvedParameterDeclaration getLastParam()
default boolean hasVariadicParameter()
default Optional<ResolvedTypeParameterDeclaration> findTypeParameter(String name)
ResolvedTypeParametrizablefindTypeParameter in interface ResolvedTypeParametrizableint getNumberOfSpecifiedExceptions()
ResolvedType getSpecifiedException(int index)
IllegalArgumentException - if the index is negative or it is equal or greater than the value returned by
getNumberOfSpecifiedExceptionsUnsupportedOperationException - for those types of methods of constructor that do not declare exceptionsdefault List<ResolvedType> getSpecifiedExceptions()
Copyright © 2007–2019. All rights reserved.