Class ReflectionRecordDeclaration

java.lang.Object
com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
com.github.javaparser.symbolsolver.reflectionmodel.ReflectionRecordDeclaration
All Implemented Interfaces:
com.github.javaparser.resolution.declarations.AssociableToAST, com.github.javaparser.resolution.declarations.HasAccessSpecifier, com.github.javaparser.resolution.declarations.ResolvedDeclaration, com.github.javaparser.resolution.declarations.ResolvedRecordDeclaration, com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration, com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration, com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable, com.github.javaparser.resolution.logic.MethodResolutionCapability, MethodUsageResolutionCapability

public class ReflectionRecordDeclaration extends AbstractTypeDeclaration implements com.github.javaparser.resolution.declarations.ResolvedRecordDeclaration, com.github.javaparser.resolution.logic.MethodResolutionCapability, MethodUsageResolutionCapability
Author:
Federico Tomassetti
  • 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
    ReflectionRecordDeclaration(Class<?> clazz, com.github.javaparser.resolution.TypeSolver typeSolver)
    Constructors
  • Method Summary

    Modifier and Type
    Method
    Description
    com.github.javaparser.ast.AccessSpecifier
     
    boolean
    canBeAssignedTo(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other)
     
    Optional<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration>
     
    boolean
     
    List<com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration>
     
    List<com.github.javaparser.resolution.types.ResolvedReferenceType>
     
    List<com.github.javaparser.resolution.types.ResolvedReferenceType>
     
    List<com.github.javaparser.resolution.types.ResolvedReferenceType>
    getAncestors(boolean acceptIncompleteList)
     
     
    List<com.github.javaparser.resolution.declarations.ResolvedConstructorDeclaration>
     
    Set<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration>
    Public methods
    com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration
     
    List<com.github.javaparser.resolution.types.ResolvedReferenceType>
     
     
     
     
    Optional<com.github.javaparser.resolution.types.ResolvedReferenceType>
     
    List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration>
     
    com.github.javaparser.resolution.types.ResolvedType
    getUsage(com.github.javaparser.ast.Node node)
     
    boolean
     
    boolean
     
    int
     
    Set<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration>
     
    boolean
    isAssignableBy(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other)
     
    boolean
    isAssignableBy(com.github.javaparser.resolution.types.ResolvedType type)
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    protected com.github.javaparser.resolution.types.ResolvedReferenceType
     
    protected com.github.javaparser.resolution.types.ResolvedReferenceType
    Protected methods
    com.github.javaparser.resolution.model.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration>
    solveMethod(String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, boolean staticOnly)
    Deprecated.
    Optional<com.github.javaparser.resolution.MethodUsage>
    solveMethodAsUsage(String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, com.github.javaparser.resolution.Context invokationContext, List<com.github.javaparser.resolution.types.ResolvedType> typeParameterValues)
     
    com.github.javaparser.resolution.model.SymbolReference<? extends com.github.javaparser.resolution.declarations.ResolvedValueDeclaration>
    solveSymbol(String name, com.github.javaparser.resolution.TypeSolver typeSolver)
    Deprecated.
    Optional<com.github.javaparser.ast.Node>
     
     

    Methods inherited from class 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, isMethod, isTypePattern, isVariable

    Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedRecordDeclaration

    asRecord

    Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration

    asReferenceType, findTypeParameter, getAllAncestors, getAllAncestors, getAllMethods, getAllNonStaticFields, getAllStaticFields, getAncestors, getDeclaredAnnotation, getDeclaredAnnotations, getDeclaredFields, getVisibleField, getVisibleFields, hasAnnotation, hasVisibleField, isFunctionalInterface, isInheritedAnnotation, isJavaLangEnum, isJavaLangObject, isJavaLangRecord, isReferenceType

    Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration

    asAnnotation, asClass, asEnum, asInterface, asType, asTypeParameter, getId, getInternalType, hasInternalType, isAnnotation, isAnonymousClass, isClass, isEnum

    Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable

    isGeneric
  • Constructor Details

    • ReflectionRecordDeclaration

      public ReflectionRecordDeclaration(Class<?> clazz, com.github.javaparser.resolution.TypeSolver typeSolver)
      Constructors
  • Method Details

    • getDeclaredMethods

      public Set<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> getDeclaredMethods()
      Public methods
      Specified by:
      getDeclaredMethods in interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
    • getAncestors

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getPackageName

      public String getPackageName()
      Specified by:
      getPackageName in interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
    • getClassName

      public String getClassName()
      Specified by:
      getClassName in interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
    • getQualifiedName

      public String getQualifiedName()
      Specified by:
      getQualifiedName in interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
    • solveMethod

      @Deprecated public com.github.javaparser.resolution.model.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> solveMethod(String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, boolean staticOnly)
      Deprecated.
      Specified by:
      solveMethod in interface com.github.javaparser.resolution.logic.MethodResolutionCapability
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getUsage

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

      public Optional<com.github.javaparser.resolution.MethodUsage> solveMethodAsUsage(String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, com.github.javaparser.resolution.Context invokationContext, List<com.github.javaparser.resolution.types.ResolvedType> typeParameterValues)
      Specified by:
      solveMethodAsUsage in interface MethodUsageResolutionCapability
    • canBeAssignedTo

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

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

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

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

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

      @Deprecated public com.github.javaparser.resolution.model.SymbolReference<? extends com.github.javaparser.resolution.declarations.ResolvedValueDeclaration> solveSymbol(String name, com.github.javaparser.resolution.TypeSolver typeSolver)
      Deprecated.
    • hasDirectlyAnnotation

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

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

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

      public String getName()
      Specified by:
      getName in interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
    • isField

      public boolean isField()
      Specified by:
      isField in interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
    • isParameter

      public boolean isParameter()
      Specified by:
      isParameter in interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
    • isType

      public boolean isType()
      Specified by:
      isType in interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
      Specified by:
      isType in interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
    • isRecord

      public boolean isRecord()
      Specified by:
      isRecord in interface com.github.javaparser.resolution.declarations.ResolvedRecordDeclaration
      Specified by:
      isRecord in interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
    • getSuperClass

      public Optional<com.github.javaparser.resolution.types.ResolvedReferenceType> getSuperClass()
      Specified by:
      getSuperClass in interface com.github.javaparser.resolution.declarations.ResolvedRecordDeclaration
    • getAllSuperClasses

      public List<com.github.javaparser.resolution.types.ResolvedReferenceType> getAllSuperClasses()
      Specified by:
      getAllSuperClasses in interface com.github.javaparser.resolution.declarations.ResolvedRecordDeclaration
    • getInterfaces

      public List<com.github.javaparser.resolution.types.ResolvedReferenceType> getInterfaces()
      Specified by:
      getInterfaces in interface com.github.javaparser.resolution.declarations.ResolvedRecordDeclaration
    • getAllInterfaces

      public List<com.github.javaparser.resolution.types.ResolvedReferenceType> getAllInterfaces()
      Specified by:
      getAllInterfaces in interface com.github.javaparser.resolution.declarations.ResolvedRecordDeclaration
    • isInterface

      public boolean isInterface()
      Specified by:
      isInterface in interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
    • getTypeParameters

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

      public com.github.javaparser.ast.AccessSpecifier accessSpecifier()
      Specified by:
      accessSpecifier in interface com.github.javaparser.resolution.declarations.HasAccessSpecifier
    • getConstructors

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

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

      public Set<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> internalTypes()
      Specified by:
      internalTypes in interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
    • toAst

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

      protected com.github.javaparser.resolution.types.ResolvedReferenceType record()
      Protected methods
    • object

      protected com.github.javaparser.resolution.types.ResolvedReferenceType object()