Package com.github.javaparser.resolution
Class MethodUsage
java.lang.Object
com.github.javaparser.resolution.MethodUsage
- All Implemented Interfaces:
ResolvedTypeParametrized
This is basically a MethodDeclaration with some TypeParameters defined.
The defined TypeParameters can comes from the Method itself or from the surrounding types.
- Author:
- Federico Tomassetti
-
Constructor Summary
ConstructorsConstructorDescriptionMethodUsage(ResolvedMethodDeclaration declaration)
MethodUsage(ResolvedMethodDeclaration declaration, List<ResolvedType> paramTypes, ResolvedType returnType)
MethodUsage(ResolvedMethodDeclaration declaration, List<ResolvedType> paramTypes, ResolvedType returnType, List<ResolvedType> exceptionTypes)
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
int
Return the number of formal arguments accepted by this method.getParamType(int i)
Return the type of the formal argument at the given position.The qualified signature of the method.The signature of the method.replaceExceptionType(int i, ResolvedType replaced)
replaceParamType(int i, ResolvedType replaced)
replaceReturnType(ResolvedType returnType)
replaceTypeParameter(ResolvedTypeParameterDeclaration typeParameter, ResolvedType type)
toString()
-
Constructor Details
-
MethodUsage
-
MethodUsage
public MethodUsage(ResolvedMethodDeclaration declaration, List<ResolvedType> paramTypes, ResolvedType returnType) -
MethodUsage
public MethodUsage(ResolvedMethodDeclaration declaration, List<ResolvedType> paramTypes, ResolvedType returnType, List<ResolvedType> exceptionTypes)
-
-
Method Details
-
toString
-
getDeclaration
-
getName
-
declaringType
-
returnType
-
getParamTypes
-
replaceParamType
-
replaceExceptionType
-
replaceReturnType
-
getNoParams
public int getNoParams()Return the number of formal arguments accepted by this method. -
getParamType
Return the type of the formal argument at the given position. -
replaceTypeParameter
public MethodUsage replaceTypeParameter(ResolvedTypeParameterDeclaration typeParameter, ResolvedType type) -
typeParametersMap
- Specified by:
typeParametersMap
in interfaceResolvedTypeParametrized
-
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. -
getSignature
The signature of the method. -
exceptionTypes
-