Class ReflectionInterfaceDeclaration
java.lang.Object
com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
com.github.javaparser.symbolsolver.reflectionmodel.ReflectionInterfaceDeclaration
- All Implemented Interfaces:
AssociableToAST<ClassOrInterfaceDeclaration>
,HasAccessSpecifier
,ResolvedDeclaration
,ResolvedInterfaceDeclaration
,ResolvedReferenceTypeDeclaration
,ResolvedTypeDeclaration
,ResolvedTypeParametrizable
,MethodUsageResolutionCapability
,SymbolResolutionCapability
,MethodResolutionCapability
public class ReflectionInterfaceDeclaration
extends AbstractTypeDeclaration
implements ResolvedInterfaceDeclaration, MethodResolutionCapability, MethodUsageResolutionCapability, SymbolResolutionCapability
- Author:
- Federico Tomassetti
-
Field Summary
Fields inherited from interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
breadthFirstFunc, depthFirstFunc, JAVA_LANG_ENUM, JAVA_LANG_OBJECT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
getAncestors(boolean acceptIncompleteList)
getName()
boolean
hasDirectlyAnnotation(String canonicalName)
boolean
int
hashCode()
boolean
boolean
isAssignableBy(ResolvedType type)
boolean
boolean
solveMethod(String name, List<ResolvedType> parameterTypes, boolean staticOnly)
Deprecated.solveMethodAsUsage(String name, List<ResolvedType> parameterTypes, Context invokationContext, List<ResolvedType> typeParameterValues)
SymbolReference<? extends ResolvedValueDeclaration>
solveSymbol(String name, TypeSolver typeSolver)
toAst()
toString()
Methods inherited from class com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
getAllMethods, isFunctionalInterface
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
asEnumConstant, asField, asMethod, asParameter, asPattern, hasName, isEnumConstant, isField, isMethod, isParameter, isPattern, isVariable
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedInterfaceDeclaration
getAllInterfacesExtended
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
asReferenceType, findTypeParameter, getAllAncestors, getAllAncestors, getAllMethods, getAllNonStaticFields, getAllStaticFields, getAncestors, getDeclaredFields, getVisibleField, getVisibleFields, hasAnnotation, hasVisibleField, isFunctionalInterface, isJavaLangEnum, isJavaLangObject
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
asAnnotation, asClass, asEnum, asType, asTypeParameter, getId, getInternalType, hasInternalType, isAnnotation, isAnonymousClass, isClass, isEnum, isType
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
isGeneric
-
Constructor Details
-
ReflectionInterfaceDeclaration
-
-
Method Details
-
isAssignableBy
- Specified by:
isAssignableBy
in interfaceResolvedReferenceTypeDeclaration
-
getPackageName
- Specified by:
getPackageName
in interfaceResolvedTypeDeclaration
-
getClassName
- Specified by:
getClassName
in interfaceResolvedTypeDeclaration
-
getQualifiedName
- Specified by:
getQualifiedName
in interfaceResolvedTypeDeclaration
-
solveMethod
@Deprecated public SymbolReference<ResolvedMethodDeclaration> solveMethod(String name, List<ResolvedType> parameterTypes, boolean staticOnly)Deprecated.- Specified by:
solveMethod
in interfaceMethodResolutionCapability
-
toString
-
getUsage
-
equals
-
hashCode
public int hashCode() -
solveMethodAsUsage
public Optional<MethodUsage> solveMethodAsUsage(String name, List<ResolvedType> parameterTypes, Context invokationContext, List<ResolvedType> typeParameterValues)- Specified by:
solveMethodAsUsage
in interfaceMethodUsageResolutionCapability
-
canBeAssignedTo
- Specified by:
canBeAssignedTo
in interfaceResolvedReferenceTypeDeclaration
-
isAssignableBy
- Specified by:
isAssignableBy
in interfaceResolvedReferenceTypeDeclaration
-
isTypeParameter
public boolean isTypeParameter()- Specified by:
isTypeParameter
in interfaceResolvedTypeDeclaration
-
getField
- Specified by:
getField
in interfaceResolvedReferenceTypeDeclaration
-
getAllFields
- Specified by:
getAllFields
in interfaceResolvedReferenceTypeDeclaration
-
solveSymbol
public SymbolReference<? extends ResolvedValueDeclaration> solveSymbol(String name, TypeSolver typeSolver)- Specified by:
solveSymbol
in interfaceSymbolResolutionCapability
- Parameters:
name
- Field / symbol name.typeSolver
- Symbol solver to resolve type usage.- Returns:
- Symbol reference of the resolved value.
-
getAncestors
- Specified by:
getAncestors
in interfaceResolvedReferenceTypeDeclaration
-
getDeclaredMethods
- Specified by:
getDeclaredMethods
in interfaceResolvedReferenceTypeDeclaration
-
hasField
- Specified by:
hasField
in interfaceResolvedReferenceTypeDeclaration
-
getName
- Specified by:
getName
in interfaceResolvedDeclaration
-
isInterface
public boolean isInterface()- Specified by:
isInterface
in interfaceResolvedInterfaceDeclaration
- Specified by:
isInterface
in interfaceResolvedTypeDeclaration
-
getInterfacesExtended
- Specified by:
getInterfacesExtended
in interfaceResolvedInterfaceDeclaration
-
containerType
- Specified by:
containerType
in interfaceResolvedTypeDeclaration
-
internalTypes
- Specified by:
internalTypes
in interfaceResolvedTypeDeclaration
-
asInterface
- Specified by:
asInterface
in interfaceResolvedTypeDeclaration
-
hasDirectlyAnnotation
- Specified by:
hasDirectlyAnnotation
in interfaceResolvedReferenceTypeDeclaration
-
getTypeParameters
- Specified by:
getTypeParameters
in interfaceResolvedTypeParametrizable
-
accessSpecifier
- Specified by:
accessSpecifier
in interfaceHasAccessSpecifier
-
getConstructors
- Specified by:
getConstructors
in interfaceResolvedReferenceTypeDeclaration
-
toAst
- Specified by:
toAst
in interfaceAssociableToAST<ClassOrInterfaceDeclaration>
-