Class JavassistMethodDeclaration
java.lang.Object
com.github.javaparser.symbolsolver.javassistmodel.JavassistMethodDeclaration
- All Implemented Interfaces:
AssociableToAST
,HasAccessSpecifier
,ResolvedDeclaration
,ResolvedMethodDeclaration
,ResolvedMethodLikeDeclaration
,ResolvedTypeParametrizable
,TypeVariableResolutionCapability
public class JavassistMethodDeclaration
extends Object
implements ResolvedMethodDeclaration, TypeVariableResolutionCapability
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate javassist.CtMethod
private final JavassistMethodLikeDeclarationAdapter
private TypeSolver
-
Constructor Summary
ConstructorsConstructorDescriptionJavassistMethodDeclaration
(javassist.CtMethod ctMethod, TypeSolver typeSolver) -
Method Summary
Modifier and TypeMethodDescriptionThe access specifier of this element.The type in which the method is declared.getName()
Should return the name or return null if the name is not available.int
Number of params.int
Number of exceptions listed in the throws clause.getParam
(int i) Get the ParameterDeclaration at the corresponding position or throw IllegalArgumentException.The type of the value returned by the current method.getSpecifiedException
(int index) Type of the corresponding entry in the throws clause.The list of type parameters defined on this element.boolean
Is the method abstract? All interface methods not marked as default are abstract.boolean
Is this a default method?boolean
isField()
Does this declaration represents a class field?boolean
Does this declaration represents a method parameter?boolean
isStatic()
boolean
isType()
Does this declaration represents a type?resolveTypeVariables
(Context context, List<ResolvedType> parameterTypes) toString()
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.AssociableToAST
toAst, toAst
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
asEnumConstant, asField, asMethod, asParameter, asType, asTypePattern, hasName, isEnumConstant, isMethod, isTypePattern, isVariable
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration
isReturnTypeSubstituable
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedMethodLikeDeclaration
findTypeParameter, formalParameterTypes, getClassName, getLastParam, getPackageName, getQualifiedName, getQualifiedSignature, getSignature, getSpecifiedExceptions, hasVariadicParameter
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
isGeneric
-
Field Details
-
ctMethod
private javassist.CtMethod ctMethod -
typeSolver
-
methodLikeAdaper
-
-
Constructor Details
-
JavassistMethodDeclaration
-
-
Method Details
-
isDefaultMethod
public boolean isDefaultMethod()Description copied from interface:ResolvedMethodDeclaration
Is this a default method?- Specified by:
isDefaultMethod
in interfaceResolvedMethodDeclaration
-
isStatic
public boolean isStatic()- Specified by:
isStatic
in interfaceResolvedMethodDeclaration
-
toString
-
getName
Description copied from interface:ResolvedDeclaration
Should return the name or return null if the name is not available.- Specified by:
getName
in interfaceResolvedDeclaration
-
isField
public boolean isField()Description copied from interface:ResolvedDeclaration
Does this declaration represents a class field?- Specified by:
isField
in interfaceResolvedDeclaration
-
isParameter
public boolean isParameter()Description copied from interface:ResolvedDeclaration
Does this declaration represents a method parameter?- Specified by:
isParameter
in interfaceResolvedDeclaration
-
isType
public boolean isType()Description copied from interface:ResolvedDeclaration
Does this declaration represents a type?- Specified by:
isType
in interfaceResolvedDeclaration
-
declaringType
Description copied from interface:ResolvedMethodLikeDeclaration
The type in which the method is declared.- Specified by:
declaringType
in interfaceResolvedMethodLikeDeclaration
-
getReturnType
Description copied from interface:ResolvedMethodDeclaration
The type of the value returned by the current method. This method can also be invoked for methods returning void.- Specified by:
getReturnType
in interfaceResolvedMethodDeclaration
-
getNumberOfParams
public int getNumberOfParams()Description copied from interface:ResolvedMethodLikeDeclaration
Number of params.- Specified by:
getNumberOfParams
in interfaceResolvedMethodLikeDeclaration
-
getParam
Description copied from interface:ResolvedMethodLikeDeclaration
Get the ParameterDeclaration at the corresponding position or throw IllegalArgumentException.- Specified by:
getParam
in interfaceResolvedMethodLikeDeclaration
-
getUsage
-
resolveTypeVariables
- Specified by:
resolveTypeVariables
in interfaceTypeVariableResolutionCapability
-
isAbstract
public boolean isAbstract()Description copied from interface:ResolvedMethodDeclaration
Is the method abstract? All interface methods not marked as default are abstract.- Specified by:
isAbstract
in interfaceResolvedMethodDeclaration
-
getTypeParameters
Description copied from interface:ResolvedTypeParametrizable
The list of type parameters defined on this element.- Specified by:
getTypeParameters
in interfaceResolvedTypeParametrizable
-
accessSpecifier
Description copied from interface:HasAccessSpecifier
The access specifier of this element.- Specified by:
accessSpecifier
in interfaceHasAccessSpecifier
-
getNumberOfSpecifiedExceptions
public int getNumberOfSpecifiedExceptions()Description copied from interface:ResolvedMethodLikeDeclaration
Number of exceptions listed in the throws clause.- Specified by:
getNumberOfSpecifiedExceptions
in interfaceResolvedMethodLikeDeclaration
-
getSpecifiedException
Description copied from interface:ResolvedMethodLikeDeclaration
Type of the corresponding entry in the throws clause.- Specified by:
getSpecifiedException
in interfaceResolvedMethodLikeDeclaration
-
toDescriptor
- Specified by:
toDescriptor
in interfaceResolvedMethodDeclaration
-