Class ReflectionMethodDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.reflectionmodel.ReflectionMethodDeclaration
-
- All Implemented Interfaces:
AssociableToAST<MethodDeclaration>,HasAccessSpecifier,ResolvedDeclaration,ResolvedMethodDeclaration,ResolvedMethodLikeDeclaration,ResolvedTypeParametrizable,TypeVariableResolutionCapability
public class ReflectionMethodDeclaration extends Object implements ResolvedMethodDeclaration, TypeVariableResolutionCapability
- Author:
- Federico Tomassetti
-
-
Constructor Summary
Constructors Constructor Description ReflectionMethodDeclaration(Method method, TypeSolver typeSolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessSpecifieraccessSpecifier()ResolvedReferenceTypeDeclarationdeclaringType()StringgetName()intgetNumberOfParams()intgetNumberOfSpecifiedExceptions()ResolvedParameterDeclarationgetParam(int i)ResolvedTypegetReturnType()ResolvedTypegetSpecifiedException(int index)List<ResolvedTypeParameterDeclaration>getTypeParameters()booleanisAbstract()booleanisDefaultMethod()booleanisField()booleanisParameter()booleanisStatic()booleanisType()MethodUsageresolveTypeVariables(Context context, List<ResolvedType> parameterTypes)Optional<MethodDeclaration>toAst()StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
asEnumConstant, asField, asMethod, asParameter, asType, hasName, isEnumConstant, isMethod, isVariable
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration
findTypeParameter, getClassName, getLastParam, getPackageName, getQualifiedName, getQualifiedSignature, getSignature, getSpecifiedExceptions, hasVariadicParameter
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
isGeneric
-
-
-
-
Constructor Detail
-
ReflectionMethodDeclaration
public ReflectionMethodDeclaration(Method method, TypeSolver typeSolver)
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceResolvedDeclaration
-
isField
public boolean isField()
- Specified by:
isFieldin interfaceResolvedDeclaration
-
isParameter
public boolean isParameter()
- Specified by:
isParameterin interfaceResolvedDeclaration
-
isType
public boolean isType()
- Specified by:
isTypein interfaceResolvedDeclaration
-
declaringType
public ResolvedReferenceTypeDeclaration declaringType()
- Specified by:
declaringTypein interfaceResolvedMethodLikeDeclaration
-
getReturnType
public ResolvedType getReturnType()
- Specified by:
getReturnTypein interfaceResolvedMethodDeclaration
-
getNumberOfParams
public int getNumberOfParams()
- Specified by:
getNumberOfParamsin interfaceResolvedMethodLikeDeclaration
-
getParam
public ResolvedParameterDeclaration getParam(int i)
- Specified by:
getParamin interfaceResolvedMethodLikeDeclaration
-
getTypeParameters
public List<ResolvedTypeParameterDeclaration> getTypeParameters()
- Specified by:
getTypeParametersin interfaceResolvedTypeParametrizable
-
resolveTypeVariables
public MethodUsage resolveTypeVariables(Context context, List<ResolvedType> parameterTypes)
- Specified by:
resolveTypeVariablesin interfaceTypeVariableResolutionCapability
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstractin interfaceResolvedMethodDeclaration
-
isDefaultMethod
public boolean isDefaultMethod()
- Specified by:
isDefaultMethodin interfaceResolvedMethodDeclaration
-
isStatic
public boolean isStatic()
- Specified by:
isStaticin interfaceResolvedMethodDeclaration
-
accessSpecifier
public AccessSpecifier accessSpecifier()
- Specified by:
accessSpecifierin interfaceHasAccessSpecifier
-
getNumberOfSpecifiedExceptions
public int getNumberOfSpecifiedExceptions()
- Specified by:
getNumberOfSpecifiedExceptionsin interfaceResolvedMethodLikeDeclaration
-
getSpecifiedException
public ResolvedType getSpecifiedException(int index)
- Specified by:
getSpecifiedExceptionin interfaceResolvedMethodLikeDeclaration
-
toAst
public Optional<MethodDeclaration> toAst()
- Specified by:
toAstin interfaceAssociableToAST<MethodDeclaration>
-
-