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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ResolvedMethodDeclaration
private List
<ResolvedType> private List
<ResolvedType> private ResolvedType
private ResolvedTypeParametersMap
-
Constructor Summary
ConstructorsModifierConstructorDescriptionMethodUsage
(ResolvedMethodDeclaration declaration) MethodUsage
(ResolvedMethodDeclaration declaration, List<ResolvedType> paramTypes, ResolvedType returnType) MethodUsage
(ResolvedMethodDeclaration declaration, List<ResolvedType> paramTypes, ResolvedType returnType, List<ResolvedType> exceptionTypes) private
MethodUsage
(ResolvedMethodDeclaration declaration, List<ResolvedType> paramTypes, ResolvedType returnType, List<ResolvedType> exceptionTypes, ResolvedTypeParametersMap typeParametersMap) -
Method Summary
Modifier and TypeMethodDescriptionThe erased signature of the method.getName()
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.boolean
isReturnTypeSubstituable
(MethodUsage otherMethodUsage) boolean
isSameSignature
(MethodUsage otherMethodUsage) boolean
isSubSignature
(MethodUsage otherMethodUsage) replaceExceptionType
(int i, ResolvedType replaced) replaceParamType
(int i, ResolvedType replaced) replaceReturnType
(ResolvedType returnType) replaceTypeParameter
(ResolvedTypeParameterDeclaration typeParameter, ResolvedType type) toString()
-
Field Details
-
declaration
-
paramTypes
-
exceptionTypes
-
returnType
-
typeParametersMap
-
-
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) -
MethodUsage
private MethodUsage(ResolvedMethodDeclaration declaration, List<ResolvedType> paramTypes, ResolvedType returnType, List<ResolvedType> exceptionTypes, ResolvedTypeParametersMap typeParametersMap)
-
-
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. -
getErasedSignature
The erased signature of the method. -
exceptionTypes
-
isSameSignature
-
isSubSignature
-
isReturnTypeSubstituable
-