Class JavaParserTypeParameter

  • All Implemented Interfaces:
    com.github.javaparser.resolution.declarations.AssociableToAST, com.github.javaparser.resolution.declarations.ResolvedDeclaration, com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration, com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration, com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration, com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable

    public class JavaParserTypeParameter
    extends AbstractTypeDeclaration
    implements com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration
    Author:
    Federico Tomassetti
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration

        com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration.Bound
    • Field Summary

      • Fields inherited from interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration

        breadthFirstFunc, depthFirstFunc, JAVA_IO_SERIALIZABLE, JAVA_LANG_COMPARABLE, JAVA_LANG_ENUM, JAVA_LANG_OBJECT, JAVA_LANG_RECORD
    • Constructor Summary

      Constructors 
      Constructor Description
      JavaParserTypeParameter​(com.github.javaparser.ast.type.TypeParameter wrappedNode, com.github.javaparser.resolution.TypeSolver typeSolver)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration asTypeParameter()  
      java.util.Optional<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> containerType()  
      boolean equals​(java.lang.Object o)  
      java.util.List<com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration> getAllFields()  
      java.util.List<com.github.javaparser.resolution.types.ResolvedReferenceType> getAncestors​(boolean acceptIncompleteList)  
      java.util.List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration.Bound> getBounds()  
      java.util.List<com.github.javaparser.resolution.declarations.ResolvedConstructorDeclaration> getConstructors()  
      com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable getContainer()  
      java.lang.String getContainerId()  
      java.lang.String getContainerQualifiedName()  
      com.github.javaparser.resolution.Context getContext()  
      java.util.Set<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> getDeclaredMethods()  
      com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration getField​(java.lang.String name)  
      java.lang.String getName()  
      java.lang.String getQualifiedName()  
      java.util.List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> getTypeParameters()  
      com.github.javaparser.resolution.types.ResolvedType getUsage​(com.github.javaparser.ast.Node node)  
      com.github.javaparser.ast.type.TypeParameter getWrappedNode()
      Returns the JavaParser node associated with this JavaParserTypeParameter.
      boolean hasDirectlyAnnotation​(java.lang.String canonicalName)  
      boolean hasField​(java.lang.String name)  
      int hashCode()  
      boolean isAssignableBy​(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other)  
      boolean isAssignableBy​(com.github.javaparser.resolution.types.ResolvedType type)  
      boolean isTypeParameter()  
      com.github.javaparser.resolution.types.ResolvedReferenceType object()  
      com.github.javaparser.resolution.model.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> solveMethod​(java.lang.String name, java.util.List<com.github.javaparser.resolution.types.ResolvedType> parameterTypes)  
      java.util.Optional<com.github.javaparser.ast.Node> toAst()  
      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
      • Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedDeclaration

        asEnumConstant, asField, asMethod, asParameter, asTypePattern, hasName, isArrayLength, isEnumConstant, isField, isMethod, isParameter, isTypePattern, isVariable
      • Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration

        asReferenceType, canBeAssignedTo, findTypeParameter, getAllAncestors, getAllAncestors, getAllNonStaticFields, getAllStaticFields, getAncestors, getDeclaredAnnotation, getDeclaredAnnotations, getDeclaredFields, getVisibleField, getVisibleFields, hasAnnotation, hasVisibleField, isInheritedAnnotation, isJavaLangEnum, isJavaLangObject, isJavaLangRecord, isReferenceType
      • Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration

        asAnnotation, asClass, asEnum, asInterface, asRecord, asType, getId, getInternalType, hasInternalType, internalTypes, isAnnotation, isAnonymousClass, isClass, isEnum, isInterface, isRecord, isType
      • Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration

        declaredOnConstructor, declaredOnMethod, declaredOnType, getClassName, getLowerBound, getPackageName, getUpperBound, hasBound, hasLowerBound, hasUpperBound, isBounded, isUnbounded
      • Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable

        isGeneric
    • Constructor Detail

      • JavaParserTypeParameter

        public JavaParserTypeParameter​(com.github.javaparser.ast.type.TypeParameter wrappedNode,
                                       com.github.javaparser.resolution.TypeSolver typeSolver)
    • Method Detail

      • getDeclaredMethods

        public java.util.Set<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> getDeclaredMethods()
        Specified by:
        getDeclaredMethods in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
      • solveMethod

        public com.github.javaparser.resolution.model.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> solveMethod​(java.lang.String name,
                                                                                                                                                           java.util.List<com.github.javaparser.resolution.types.ResolvedType> parameterTypes)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
        Specified by:
        getName in interface com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration
      • isAssignableBy

        public boolean isAssignableBy​(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other)
        Specified by:
        isAssignableBy in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
      • getContainerQualifiedName

        public java.lang.String getContainerQualifiedName()
        Specified by:
        getContainerQualifiedName in interface com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration
      • getContainerId

        public java.lang.String getContainerId()
        Specified by:
        getContainerId in interface com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration
      • getContainer

        public com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable getContainer()
        Specified by:
        getContainer in interface com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration
      • getQualifiedName

        public java.lang.String getQualifiedName()
        Specified by:
        getQualifiedName in interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
        Specified by:
        getQualifiedName in interface com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration
      • getBounds

        public java.util.List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration.Bound> getBounds()
        Specified by:
        getBounds in interface com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration
      • getContext

        public com.github.javaparser.resolution.Context getContext()
      • getUsage

        public com.github.javaparser.resolution.types.ResolvedType getUsage​(com.github.javaparser.ast.Node node)
      • isAssignableBy

        public boolean isAssignableBy​(com.github.javaparser.resolution.types.ResolvedType type)
        Specified by:
        isAssignableBy in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
      • getField

        public com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration getField​(java.lang.String name)
        Specified by:
        getField in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
      • hasField

        public boolean hasField​(java.lang.String name)
        Specified by:
        hasField in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
      • getAllFields

        public java.util.List<com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration> getAllFields()
        Specified by:
        getAllFields in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
      • getAncestors

        public java.util.List<com.github.javaparser.resolution.types.ResolvedReferenceType> getAncestors​(boolean acceptIncompleteList)
        Specified by:
        getAncestors in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
      • isTypeParameter

        public boolean isTypeParameter()
        Specified by:
        isTypeParameter in interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
        Specified by:
        isTypeParameter in interface com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration
      • asTypeParameter

        public com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration asTypeParameter()
        Specified by:
        asTypeParameter in interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
        Specified by:
        asTypeParameter in interface com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration
      • hasDirectlyAnnotation

        public boolean hasDirectlyAnnotation​(java.lang.String canonicalName)
        Specified by:
        hasDirectlyAnnotation in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
      • getTypeParameters

        public java.util.List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> getTypeParameters()
        Specified by:
        getTypeParameters in interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
      • getWrappedNode

        public com.github.javaparser.ast.type.TypeParameter getWrappedNode()
        Returns the JavaParser node associated with this JavaParserTypeParameter.
        Returns:
        A visitable JavaParser node wrapped by this object.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • containerType

        public java.util.Optional<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> containerType()
        Specified by:
        containerType in interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
      • getConstructors

        public java.util.List<com.github.javaparser.resolution.declarations.ResolvedConstructorDeclaration> getConstructors()
        Specified by:
        getConstructors in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
      • object

        public com.github.javaparser.resolution.types.ResolvedReferenceType object()
        Specified by:
        object in interface com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration
      • toAst

        public java.util.Optional<com.github.javaparser.ast.Node> toAst()
        Specified by:
        toAst in interface com.github.javaparser.resolution.declarations.AssociableToAST