Class ReflectionConstructorDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.reflectionmodel.ReflectionConstructorDeclaration
-
- All Implemented Interfaces:
AssociableToAST
,HasAccessSpecifier
,ResolvedConstructorDeclaration
,ResolvedDeclaration
,ResolvedMethodLikeDeclaration
,ResolvedTypeParametrizable
public class ReflectionConstructorDeclaration extends java.lang.Object implements ResolvedConstructorDeclaration
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.Constructor<?>
constructor
private TypeSolver
typeSolver
-
Constructor Summary
Constructors Constructor Description ReflectionConstructorDeclaration(java.lang.reflect.Constructor<?> constructor, TypeSolver typeSolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessSpecifier
accessSpecifier()
The access specifier of this element.ResolvedReferenceTypeDeclaration
declaringType()
A constructor can be declared in a class or an enum.java.lang.String
getName()
Should return the name or return null if the name is not available.int
getNumberOfParams()
Number of params.int
getNumberOfSpecifiedExceptions()
Number of exceptions listed in the throws clause.ResolvedParameterDeclaration
getParam(int i)
Get the ParameterDeclaration at the corresponding position or throw IllegalArgumentException.ResolvedType
getSpecifiedException(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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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, isField, isMethod, isParameter, isType, 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
-
constructor
private java.lang.reflect.Constructor<?> constructor
-
typeSolver
private TypeSolver typeSolver
-
-
Constructor Detail
-
ReflectionConstructorDeclaration
public ReflectionConstructorDeclaration(java.lang.reflect.Constructor<?> constructor, TypeSolver typeSolver)
-
-
Method Detail
-
declaringType
public ResolvedReferenceTypeDeclaration 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
public ResolvedParameterDeclaration getParam(int i)
Description copied from interface:ResolvedMethodLikeDeclaration
Get the ParameterDeclaration at the corresponding position or throw IllegalArgumentException.- Specified by:
getParam
in interfaceResolvedMethodLikeDeclaration
-
getName
public java.lang.String getName()
Description copied from interface:ResolvedDeclaration
Should return the name or return null if the name is not available.- Specified by:
getName
in interfaceResolvedDeclaration
-
accessSpecifier
public AccessSpecifier accessSpecifier()
Description copied from interface:HasAccessSpecifier
The access specifier of this element.- Specified by:
accessSpecifier
in interfaceHasAccessSpecifier
-
getTypeParameters
public java.util.List<ResolvedTypeParameterDeclaration> getTypeParameters()
Description copied from interface:ResolvedTypeParametrizable
The list of type parameters defined on this element.- Specified by:
getTypeParameters
in interfaceResolvedTypeParametrizable
-
getNumberOfSpecifiedExceptions
public int getNumberOfSpecifiedExceptions()
Description copied from interface:ResolvedMethodLikeDeclaration
Number of exceptions listed in the throws clause.- Specified by:
getNumberOfSpecifiedExceptions
in interfaceResolvedMethodLikeDeclaration
-
getSpecifiedException
public ResolvedType getSpecifiedException(int index)
Description copied from interface:ResolvedMethodLikeDeclaration
Type of the corresponding entry in the throws clause.- Specified by:
getSpecifiedException
in interfaceResolvedMethodLikeDeclaration
-
-