Top Description Fields Constructors Methods
com.github.javaparser.resolution

public Class MethodUsage

extends Object
implements ResolvedTypeParametrized
Class Inheritance
All Implemented Interfaces
com.github.javaparser.resolution.types.parametrization.ResolvedTypeParametrized
Imports
com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration, .ResolvedReferenceTypeDeclaration, .ResolvedTypeParameterDeclaration, com.github.javaparser.resolution.types.ResolvedType, com.github.javaparser.resolution.types.parametrization.ResolvedTypeParametersMap, .ResolvedTypeParametrized, java.util.*

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

Field Summary

Modifier and TypeField and Description
private ResolvedMethodDeclaration
private List<ResolvedType>
private List<ResolvedType>
private ResolvedType
private ResolvedTypeParametersMap

Constructor Summary

AccessConstructor and Description
public
public
MethodUsage(ResolvedMethodDeclaration declaration, List<ResolvedType> paramTypes, ResolvedType returnType)

public
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 TypeMethod and Description
public ResolvedReferenceTypeDeclaration
public List<ResolvedType>
public ResolvedMethodDeclaration
public String
public int
getNoParams()

Return the number of formal arguments accepted by this method.

public ResolvedType
getParamType(int i)

Return the type of the formal argument at the given position.

public List<ResolvedType>
public String
public MethodUsage
public MethodUsage
replaceParamType(int i, ResolvedType replaced)

public MethodUsage
public MethodUsage
public ResolvedType
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public ResolvedTypeParametersMap
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

declarationback to summary
private ResolvedMethodDeclaration declaration
exceptionTypesback to summary
private List<ResolvedType> exceptionTypes
paramTypesback to summary
private List<ResolvedType> paramTypes
returnTypeback to summary
private ResolvedType returnType
typeParametersMapback to summary
private ResolvedTypeParametersMap typeParametersMap

Constructor Detail

MethodUsageback to summary
public MethodUsage(ResolvedMethodDeclaration declaration)
MethodUsageback to summary
public MethodUsage(ResolvedMethodDeclaration declaration, List<ResolvedType> paramTypes, ResolvedType returnType)
MethodUsageback to summary
public MethodUsage(ResolvedMethodDeclaration declaration, List<ResolvedType> paramTypes, ResolvedType returnType, List<ResolvedType> exceptionTypes)
MethodUsageback to summary
private MethodUsage(ResolvedMethodDeclaration declaration, List<ResolvedType> paramTypes, ResolvedType returnType, List<ResolvedType> exceptionTypes, ResolvedTypeParametersMap typeParametersMap)

Method Detail

declaringTypeback to summary
public ResolvedReferenceTypeDeclaration declaringType()
exceptionTypesback to summary
public List<ResolvedType> exceptionTypes()
getDeclarationback to summary
public ResolvedMethodDeclaration getDeclaration()
getNameback to summary
public String getName()
getNoParamsback to summary
public int getNoParams()

Return the number of formal arguments accepted by this method.

getParamTypeback to summary
public ResolvedType getParamType(int i)

Return the type of the formal argument at the given position.

getParamTypesback to summary
public List<ResolvedType> getParamTypes()
getQualifiedSignatureback to summary
public String getQualifiedSignature()
replaceExceptionTypeback to summary
public MethodUsage replaceExceptionType(int i, ResolvedType replaced)
replaceParamTypeback to summary
public MethodUsage replaceParamType(int i, ResolvedType replaced)
replaceReturnTypeback to summary
public MethodUsage replaceReturnType(ResolvedType returnType)
replaceTypeParameterback to summary
public MethodUsage replaceTypeParameter(ResolvedTypeParameterDeclaration typeParameter, ResolvedType type)
returnTypeback to summary
public ResolvedType returnType()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
typeParametersMapback to summary
public ResolvedTypeParametersMap typeParametersMap()

Implements com.github.javaparser.resolution.types.parametrization.ResolvedTypeParametrized.typeParametersMap.

Annotations
@Override