Class ReflectionTypeParameter
- java.lang.Object
-
- com.github.javaparser.symbolsolver.reflectionmodel.ReflectionTypeParameter
-
- All Implemented Interfaces:
AssociableToAST
,ResolvedDeclaration
,ResolvedTypeDeclaration
,ResolvedTypeParameterDeclaration
public class ReflectionTypeParameter extends java.lang.Object implements ResolvedTypeParameterDeclaration
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration
ResolvedTypeParameterDeclaration.Bound
-
-
Field Summary
Fields Modifier and Type Field Description private ResolvedTypeParametrizable
container
private TypeSolver
typeSolver
private java.lang.reflect.TypeVariable
typeVariable
-
Constructor Summary
Constructors Constructor Description ReflectionTypeParameter(java.lang.reflect.TypeVariable typeVariable, boolean declaredOnClass, TypeSolver typeSolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<ResolvedReferenceTypeDeclaration>
containerType()
Get the ReferenceTypeDeclaration enclosing this declaration.boolean
equals(java.lang.Object o)
java.util.List<ResolvedTypeParameterDeclaration.Bound>
getBounds()
The bounds specified for the type parameter.ResolvedTypeParametrizable
getContainer()
The TypeParametrizable of the container.java.lang.String
getContainerId()
The ID of the container.java.lang.String
getContainerQualifiedName()
The qualified name of the container.java.lang.String
getName()
Name of the type parameter.int
hashCode()
ResolvedReferenceType
object()
java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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, asTypePattern, hasName, isEnumConstant, isField, isMethod, isParameter, isTypePattern, isVariable
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
asAnnotation, asClass, asEnum, asInterface, asRecord, asReferenceType, asType, getId, getInternalType, hasInternalType, internalTypes, isAnnotation, isAnonymousClass, isClass, isEnum, isInterface, isRecord, isReferenceType, isType
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration
asTypeParameter, declaredOnConstructor, declaredOnMethod, declaredOnType, getClassName, getLowerBound, getPackageName, getQualifiedName, getUpperBound, hasBound, hasLowerBound, hasUpperBound, isBounded, isTypeParameter, isUnbounded
-
-
-
-
Field Detail
-
typeVariable
private java.lang.reflect.TypeVariable typeVariable
-
typeSolver
private TypeSolver typeSolver
-
container
private ResolvedTypeParametrizable container
-
-
Constructor Detail
-
ReflectionTypeParameter
public ReflectionTypeParameter(java.lang.reflect.TypeVariable typeVariable, boolean declaredOnClass, TypeSolver typeSolver)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getName
public java.lang.String getName()
Description copied from interface:ResolvedTypeParameterDeclaration
Name of the type parameter.- Specified by:
getName
in interfaceResolvedDeclaration
- Specified by:
getName
in interfaceResolvedTypeParameterDeclaration
-
getContainerQualifiedName
public java.lang.String getContainerQualifiedName()
Description copied from interface:ResolvedTypeParameterDeclaration
The qualified name of the container.- Specified by:
getContainerQualifiedName
in interfaceResolvedTypeParameterDeclaration
-
getContainerId
public java.lang.String getContainerId()
Description copied from interface:ResolvedTypeParameterDeclaration
The ID of the container. See TypeContainer.getId- Specified by:
getContainerId
in interfaceResolvedTypeParameterDeclaration
-
getContainer
public ResolvedTypeParametrizable getContainer()
Description copied from interface:ResolvedTypeParameterDeclaration
The TypeParametrizable of the container. Can be either a ReferenceTypeDeclaration or a MethodLikeDeclaration- Specified by:
getContainer
in interfaceResolvedTypeParameterDeclaration
-
getBounds
public java.util.List<ResolvedTypeParameterDeclaration.Bound> getBounds()
Description copied from interface:ResolvedTypeParameterDeclaration
The bounds specified for the type parameter. For example: "extends A" or "super B"- Specified by:
getBounds
in interfaceResolvedTypeParameterDeclaration
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
containerType
public java.util.Optional<ResolvedReferenceTypeDeclaration> containerType()
Description copied from interface:ResolvedTypeDeclaration
Get the ReferenceTypeDeclaration enclosing this declaration.- Specified by:
containerType
in interfaceResolvedTypeDeclaration
-
object
public ResolvedReferenceType object()
- Specified by:
object
in interfaceResolvedTypeParameterDeclaration
-
-