Class JavassistConstructorDeclaration
java.lang.Object
com.github.javaparser.symbolsolver.javassistmodel.JavassistConstructorDeclaration
- All Implemented Interfaces:
AssociableToAST
,HasAccessSpecifier
,ResolvedConstructorDeclaration
,ResolvedDeclaration
,ResolvedMethodLikeDeclaration
,ResolvedTypeParametrizable
public class JavassistConstructorDeclaration
extends Object
implements ResolvedConstructorDeclaration
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final javassist.CtConstructor
private final JavassistMethodLikeDeclarationAdapter
private final TypeSolver
-
Constructor Summary
ConstructorsConstructorDescriptionJavassistConstructorDeclaration
(javassist.CtConstructor ctConstructor, TypeSolver typeSolver) -
Method Summary
Modifier and TypeMethodDescriptionThe access specifier of this element.A constructor can be declared in a class or an enum.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.getSpecifiedException
(int index) Type of the corresponding entry in the throws clause.The list of type parameters defined on this element.boolean
isField()
Does this declaration represents a class field?boolean
Does this declaration represents a method parameter?boolean
isType()
Does this declaration represents a type?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.ResolvedMethodLikeDeclaration
findTypeParameter, formalParameterTypes, getClassName, getLastParam, getPackageName, getQualifiedName, getQualifiedSignature, getSignature, getSpecifiedExceptions, hasVariadicParameter
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
isGeneric
-
Field Details
-
ctConstructor
private final javassist.CtConstructor ctConstructor -
typeSolver
-
methodLikeAdaper
-
-
Constructor Details
-
JavassistConstructorDeclaration
public JavassistConstructorDeclaration(javassist.CtConstructor ctConstructor, TypeSolver typeSolver)
-
-
Method Details
-
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:ResolvedConstructorDeclaration
A constructor can be declared in a class or an enum.- Specified by:
declaringType
in interfaceResolvedConstructorDeclaration
- Specified by:
declaringType
in interfaceResolvedMethodLikeDeclaration
-
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
-
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
-