Class ReflectionMethodDeclaration

  • All Implemented Interfaces:
    com.github.javaparser.resolution.declarations.AssociableToAST<com.github.javaparser.ast.body.MethodDeclaration>, com.github.javaparser.resolution.declarations.HasAccessSpecifier, com.github.javaparser.resolution.declarations.ResolvedDeclaration, com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration, com.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration, com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable, TypeVariableResolutionCapability

    public class ReflectionMethodDeclaration
    extends Object
    implements com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration, TypeVariableResolutionCapability
    Author:
    Federico Tomassetti
    • Constructor Detail

      • ReflectionMethodDeclaration

        public ReflectionMethodDeclaration​(Method method,
                                           com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
    • Method Detail

      • getName

        public String getName()
        Specified by:
        getName in interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
      • isField

        public boolean isField()
        Specified by:
        isField in interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
      • isParameter

        public boolean isParameter()
        Specified by:
        isParameter in interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
      • isType

        public boolean isType()
        Specified by:
        isType in interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
      • declaringType

        public com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration declaringType()
        Specified by:
        declaringType in interface com.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration
      • getReturnType

        public com.github.javaparser.resolution.types.ResolvedType getReturnType()
        Specified by:
        getReturnType in interface com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration
      • getNumberOfParams

        public int getNumberOfParams()
        Specified by:
        getNumberOfParams in interface com.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration
      • getParam

        public com.github.javaparser.resolution.declarations.ResolvedParameterDeclaration getParam​(int i)
        Specified by:
        getParam in interface com.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration
      • getTypeParameters

        public List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> getTypeParameters()
        Specified by:
        getTypeParameters in interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
      • isAbstract

        public boolean isAbstract()
        Specified by:
        isAbstract in interface com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration
      • isDefaultMethod

        public boolean isDefaultMethod()
        Specified by:
        isDefaultMethod in interface com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration
      • isStatic

        public boolean isStatic()
        Specified by:
        isStatic in interface com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration
      • accessSpecifier

        public com.github.javaparser.ast.AccessSpecifier accessSpecifier()
        Specified by:
        accessSpecifier in interface com.github.javaparser.resolution.declarations.HasAccessSpecifier
      • getNumberOfSpecifiedExceptions

        public int getNumberOfSpecifiedExceptions()
        Specified by:
        getNumberOfSpecifiedExceptions in interface com.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration
      • getSpecifiedException

        public com.github.javaparser.resolution.types.ResolvedType getSpecifiedException​(int index)
        Specified by:
        getSpecifiedException in interface com.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration
      • toAst

        public Optional<com.github.javaparser.ast.body.MethodDeclaration> toAst()
        Specified by:
        toAst in interface com.github.javaparser.resolution.declarations.AssociableToAST<com.github.javaparser.ast.body.MethodDeclaration>