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.CtMethodprivate final JavassistMethodLikeDeclarationAdapterprivate 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.intNumber of params.intNumber 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.booleanIs the method abstract? All interface methods not marked as default are abstract.booleanIs this a default method?booleanisField()Does this declaration represents a class field?booleanDoes this declaration represents a method parameter?booleanisStatic()booleanisType()Does this declaration represents a type?resolveTypeVariables(Context context, List<ResolvedType> parameterTypes) toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AssociableToAST
toAst, toAstMethods inherited from interface ResolvedDeclaration
asEnumConstant, asField, asMethod, asParameter, asType, asTypePattern, hasName, isEnumConstant, isMethod, isTypePattern, isVariableMethods inherited from interface ResolvedMethodDeclaration
isReturnTypeSubstituableMethods inherited from interface ResolvedMethodLikeDeclaration
findTypeParameter, formalParameterTypes, getClassName, getLastParam, getPackageName, getQualifiedName, getQualifiedSignature, getSignature, getSpecifiedExceptions, hasVariadicParameterMethods inherited from interface ResolvedTypeParametrizable
isGeneric
-
Field Details
-
ctMethod
private javassist.CtMethod ctMethod -
typeSolver
-
methodLikeAdaper
-
-
Constructor Details
-
JavassistMethodDeclaration
-
-
Method Details
-
isDefaultMethod
public boolean isDefaultMethod()Description copied from interface:ResolvedMethodDeclarationIs this a default method?- Specified by:
isDefaultMethodin interfaceResolvedMethodDeclaration
-
isStatic
public boolean isStatic()- Specified by:
isStaticin interfaceResolvedMethodDeclaration
-
toString
-
getName
Description copied from interface:ResolvedDeclarationShould return the name or return null if the name is not available.- Specified by:
getNamein interfaceResolvedDeclaration
-
isField
public boolean isField()Description copied from interface:ResolvedDeclarationDoes this declaration represents a class field?- Specified by:
isFieldin interfaceResolvedDeclaration
-
isParameter
public boolean isParameter()Description copied from interface:ResolvedDeclarationDoes this declaration represents a method parameter?- Specified by:
isParameterin interfaceResolvedDeclaration
-
isType
public boolean isType()Description copied from interface:ResolvedDeclarationDoes this declaration represents a type?- Specified by:
isTypein interfaceResolvedDeclaration
-
declaringType
Description copied from interface:ResolvedMethodLikeDeclarationThe type in which the method is declared.- Specified by:
declaringTypein interfaceResolvedMethodLikeDeclaration
-
getReturnType
Description copied from interface:ResolvedMethodDeclarationThe type of the value returned by the current method. This method can also be invoked for methods returning void.- Specified by:
getReturnTypein interfaceResolvedMethodDeclaration
-
getNumberOfParams
public int getNumberOfParams()Description copied from interface:ResolvedMethodLikeDeclarationNumber of params.- Specified by:
getNumberOfParamsin interfaceResolvedMethodLikeDeclaration
-
getParam
Description copied from interface:ResolvedMethodLikeDeclarationGet the ParameterDeclaration at the corresponding position or throw IllegalArgumentException.- Specified by:
getParamin interfaceResolvedMethodLikeDeclaration
-
getUsage
-
resolveTypeVariables
- Specified by:
resolveTypeVariablesin interfaceTypeVariableResolutionCapability
-
isAbstract
public boolean isAbstract()Description copied from interface:ResolvedMethodDeclarationIs the method abstract? All interface methods not marked as default are abstract.- Specified by:
isAbstractin interfaceResolvedMethodDeclaration
-
getTypeParameters
Description copied from interface:ResolvedTypeParametrizableThe list of type parameters defined on this element.- Specified by:
getTypeParametersin interfaceResolvedTypeParametrizable
-
accessSpecifier
Description copied from interface:HasAccessSpecifierThe access specifier of this element.- Specified by:
accessSpecifierin interfaceHasAccessSpecifier
-
getNumberOfSpecifiedExceptions
public int getNumberOfSpecifiedExceptions()Description copied from interface:ResolvedMethodLikeDeclarationNumber of exceptions listed in the throws clause.- Specified by:
getNumberOfSpecifiedExceptionsin interfaceResolvedMethodLikeDeclaration
-
getSpecifiedException
Description copied from interface:ResolvedMethodLikeDeclarationType of the corresponding entry in the throws clause.- Specified by:
getSpecifiedExceptionin interfaceResolvedMethodLikeDeclaration
-
toDescriptor
- Specified by:
toDescriptorin interfaceResolvedMethodDeclaration
-