Class JavaParserMethodDeclaration
java.lang.Object
com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserMethodDeclaration
- All Implemented Interfaces:
com.github.javaparser.resolution.declarations.AssociableToAST, 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 JavaParserMethodDeclaration
extends Object
implements com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration, TypeVariableResolutionCapability
- Author:
- Federico Tomassetti
-
Constructor Summary
ConstructorsConstructorDescriptionJavaParserMethodDeclaration(com.github.javaparser.ast.body.MethodDeclaration wrappedNode, com.github.javaparser.resolution.TypeSolver typeSolver) -
Method Summary
Modifier and TypeMethodDescriptioncom.github.javaparser.ast.AccessSpecifiercom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclarationgetName()intintcom.github.javaparser.resolution.declarations.ResolvedParameterDeclarationgetParam(int i) com.github.javaparser.resolution.types.ResolvedTypecom.github.javaparser.resolution.types.ResolvedTypegetSpecifiedException(int index) List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> com.github.javaparser.resolution.MethodUsagegetUsage(com.github.javaparser.ast.Node node) com.github.javaparser.ast.body.MethodDeclarationReturns the JavaParser node associated with this JavaParserMethodDeclaration.booleanbooleanbooleanisStatic()com.github.javaparser.resolution.MethodUsageresolveTypeVariables(com.github.javaparser.resolution.Context context, List<com.github.javaparser.resolution.types.ResolvedType> parameterTypes) Optional<com.github.javaparser.ast.Node> toAst()toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.javaparser.resolution.declarations.AssociableToAST
toAstMethods inherited from interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
asEnumConstant, asField, asMethod, asParameter, asType, asTypePattern, hasName, isArrayLength, isEnumConstant, isField, isMethod, isParameter, isType, isTypePattern, isVariableMethods inherited from interface com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration
isReturnTypeSubstituableMethods inherited from interface com.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration
findTypeParameter, formalParameterTypes, getClassName, getLastParam, getPackageName, getQualifiedName, getQualifiedSignature, getSignature, getSpecifiedExceptions, hasVariadicParameterMethods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
isGeneric
-
Constructor Details
-
JavaParserMethodDeclaration
public JavaParserMethodDeclaration(com.github.javaparser.ast.body.MethodDeclaration wrappedNode, com.github.javaparser.resolution.TypeSolver typeSolver)
-
-
Method Details
-
toString
-
declaringType
public com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration declaringType()- Specified by:
declaringTypein interfacecom.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration
-
getReturnType
public com.github.javaparser.resolution.types.ResolvedType getReturnType()- Specified by:
getReturnTypein interfacecom.github.javaparser.resolution.declarations.ResolvedMethodDeclaration
-
getNumberOfParams
public int getNumberOfParams()- Specified by:
getNumberOfParamsin interfacecom.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration
-
getParam
public com.github.javaparser.resolution.declarations.ResolvedParameterDeclaration getParam(int i) - Specified by:
getParamin interfacecom.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration
-
getUsage
public com.github.javaparser.resolution.MethodUsage getUsage(com.github.javaparser.ast.Node node) -
resolveTypeVariables
public com.github.javaparser.resolution.MethodUsage resolveTypeVariables(com.github.javaparser.resolution.Context context, List<com.github.javaparser.resolution.types.ResolvedType> parameterTypes) - Specified by:
resolveTypeVariablesin interfaceTypeVariableResolutionCapability
-
isAbstract
public boolean isAbstract()- Specified by:
isAbstractin interfacecom.github.javaparser.resolution.declarations.ResolvedMethodDeclaration
-
getName
- Specified by:
getNamein interfacecom.github.javaparser.resolution.declarations.ResolvedDeclaration
-
getTypeParameters
public List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> getTypeParameters()- Specified by:
getTypeParametersin interfacecom.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
-
isDefaultMethod
public boolean isDefaultMethod()- Specified by:
isDefaultMethodin interfacecom.github.javaparser.resolution.declarations.ResolvedMethodDeclaration
-
isStatic
public boolean isStatic()- Specified by:
isStaticin interfacecom.github.javaparser.resolution.declarations.ResolvedMethodDeclaration
-
getWrappedNode
public com.github.javaparser.ast.body.MethodDeclaration getWrappedNode()Returns the JavaParser node associated with this JavaParserMethodDeclaration.- Returns:
- A visitable JavaParser node wrapped by this object.
-
accessSpecifier
public com.github.javaparser.ast.AccessSpecifier accessSpecifier()- Specified by:
accessSpecifierin interfacecom.github.javaparser.resolution.declarations.HasAccessSpecifier
-
getNumberOfSpecifiedExceptions
public int getNumberOfSpecifiedExceptions()- Specified by:
getNumberOfSpecifiedExceptionsin interfacecom.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration
-
getSpecifiedException
public com.github.javaparser.resolution.types.ResolvedType getSpecifiedException(int index) - Specified by:
getSpecifiedExceptionin interfacecom.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration
-
toAst
- Specified by:
toAstin interfacecom.github.javaparser.resolution.declarations.AssociableToAST
-
toDescriptor
- Specified by:
toDescriptorin interfacecom.github.javaparser.resolution.declarations.ResolvedMethodDeclaration
-