Interface ResolvedMethodLikeDeclaration

    • Method Detail

      • getPackageName

        default String getPackageName()
        The package name of the declaring type.
      • getClassName

        default String getClassName()
        The class(es) wrapping the declaring type.
      • getQualifiedName

        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.
      • getSignature

        default String getSignature()
        The signature of the method.
      • getQualifiedSignature

        default String getQualifiedSignature()
        The qualified signature of the method. It is composed by the qualified name of the declaring type followed by the signature of the method.
      • getNumberOfParams

        int getNumberOfParams()
        Number of params.
      • getParam

        ResolvedParameterDeclaration getParam​(int i)
        Get the ParameterDeclaration at the corresponding position or throw IllegalArgumentException.
      • getLastParam

        default ResolvedParameterDeclaration getLastParam()
        Utility method to get the last ParameterDeclaration. It throws UnsupportedOperationException if the method has no parameters. The last parameter can be variadic and sometimes it needs to be handled in a special way.
      • hasVariadicParameter

        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.
      • getNumberOfSpecifiedExceptions

        int getNumberOfSpecifiedExceptions()
        Number of exceptions listed in the throws clause.
      • getSpecifiedException

        ResolvedType getSpecifiedException​(int index)
        Type of the corresponding entry in the throws clause.
        Throws:
        IllegalArgumentException - if the index is negative or it is equal or greater than the value returned by getNumberOfSpecifiedExceptions
        UnsupportedOperationException - for those types of methods of constructor that do not declare exceptions