Class JavassistConstructorDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.javassistmodel.JavassistConstructorDeclaration
-
- All Implemented Interfaces:
AssociableToAST,HasAccessSpecifier,ResolvedConstructorDeclaration,ResolvedDeclaration,ResolvedMethodLikeDeclaration,ResolvedTypeParametrizable
public class JavassistConstructorDeclaration extends java.lang.Object implements ResolvedConstructorDeclaration
-
-
Field Summary
Fields Modifier and Type Field Description private javassist.CtConstructorctConstructorprivate JavassistMethodLikeDeclarationAdaptermethodLikeAdaperprivate TypeSolvertypeSolver
-
Constructor Summary
Constructors Constructor Description JavassistConstructorDeclaration(javassist.CtConstructor ctConstructor, TypeSolver typeSolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessSpecifieraccessSpecifier()The access specifier of this element.ResolvedReferenceTypeDeclarationdeclaringType()A constructor can be declared in a class or an enum.java.lang.StringgetName()Should return the name or return null if the name is not available.intgetNumberOfParams()Number of params.intgetNumberOfSpecifiedExceptions()Number of exceptions listed in the throws clause.ResolvedParameterDeclarationgetParam(int i)Get the ParameterDeclaration at the corresponding position or throw IllegalArgumentException.ResolvedTypegetSpecifiedException(int index)Type of the corresponding entry in the throws clause.java.util.List<ResolvedTypeParameterDeclaration>getTypeParameters()The list of type parameters defined on this element.booleanisField()Does this declaration represents a class field?booleanisParameter()Does this declaration represents a method parameter?booleanisType()Does this declaration represents a type?java.lang.StringtoString()-
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 Detail
-
ctConstructor
private final javassist.CtConstructor ctConstructor
-
typeSolver
private final TypeSolver typeSolver
-
methodLikeAdaper
private final JavassistMethodLikeDeclarationAdapter methodLikeAdaper
-
-
Constructor Detail
-
JavassistConstructorDeclaration
public JavassistConstructorDeclaration(javassist.CtConstructor ctConstructor, TypeSolver typeSolver)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getName
public java.lang.String 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
public ResolvedReferenceTypeDeclaration declaringType()
Description copied from interface:ResolvedConstructorDeclarationA constructor can be declared in a class or an enum.- Specified by:
declaringTypein interfaceResolvedConstructorDeclaration- Specified by:
declaringTypein interfaceResolvedMethodLikeDeclaration
-
getNumberOfParams
public int getNumberOfParams()
Description copied from interface:ResolvedMethodLikeDeclarationNumber of params.- Specified by:
getNumberOfParamsin interfaceResolvedMethodLikeDeclaration
-
getParam
public ResolvedParameterDeclaration getParam(int i)
Description copied from interface:ResolvedMethodLikeDeclarationGet the ParameterDeclaration at the corresponding position or throw IllegalArgumentException.- Specified by:
getParamin interfaceResolvedMethodLikeDeclaration
-
getTypeParameters
public java.util.List<ResolvedTypeParameterDeclaration> getTypeParameters()
Description copied from interface:ResolvedTypeParametrizableThe list of type parameters defined on this element.- Specified by:
getTypeParametersin interfaceResolvedTypeParametrizable
-
accessSpecifier
public AccessSpecifier 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
public ResolvedType getSpecifiedException(int index)
Description copied from interface:ResolvedMethodLikeDeclarationType of the corresponding entry in the throws clause.- Specified by:
getSpecifiedExceptionin interfaceResolvedMethodLikeDeclaration
-
-