Class JavassistInterfaceDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
-
- com.github.javaparser.symbolsolver.javassistmodel.JavassistInterfaceDeclaration
-
- All Implemented Interfaces:
AssociableToAST
,HasAccessSpecifier
,ResolvedDeclaration
,ResolvedInterfaceDeclaration
,ResolvedReferenceTypeDeclaration
,ResolvedTypeDeclaration
,ResolvedTypeParametrizable
,MethodResolutionCapability
,MethodUsageResolutionCapability
,SymbolResolutionCapability
public class JavassistInterfaceDeclaration 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_IO_SERIALIZABLE, JAVA_LANG_COMPARABLE, JAVA_LANG_ENUM, JAVA_LANG_OBJECT, JAVA_LANG_RECORD
-
-
Constructor Summary
Constructors Constructor Description JavassistInterfaceDeclaration(javassist.CtClass ctClass, TypeSolver typeSolver)
-
Method Summary
-
Methods inherited from class com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
getAllMethods, isFunctionalInterface, isRecordType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, 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.ResolvedInterfaceDeclaration
getAllInterfacesExtended, isInterface
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
asReferenceType, findTypeParameter, getAllAncestors, getAllAncestors, getAllMethods, getAllNonStaticFields, getAllStaticFields, getAncestors, getDeclaredAnnotation, getDeclaredFields, getField, getVisibleField, getVisibleFields, hasAnnotation, hasField, hasVisibleField, isFunctionalInterface, isInheritedAnnotation, isJavaLangEnum, isJavaLangObject, isJavaLangRecord, isReferenceType
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
asAnnotation, asClass, asEnum, asRecord, asType, asTypeParameter, getId, isAnnotation, isAnonymousClass, isClass, isEnum, isRecord, isType, isTypeParameter
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
isGeneric
-
-
-
-
Constructor Detail
-
JavassistInterfaceDeclaration
public JavassistInterfaceDeclaration(javassist.CtClass ctClass, TypeSolver typeSolver)
-
-
Method Detail
-
getInterfacesExtended
public List<ResolvedReferenceType> getInterfacesExtended()
- Specified by:
getInterfacesExtended
in interfaceResolvedInterfaceDeclaration
-
getPackageName
public String getPackageName()
- Specified by:
getPackageName
in interfaceResolvedTypeDeclaration
-
getClassName
public String getClassName()
- Specified by:
getClassName
in interfaceResolvedTypeDeclaration
-
getQualifiedName
public String getQualifiedName()
- Specified by:
getQualifiedName
in interfaceResolvedTypeDeclaration
-
solveMethodAsUsage
@Deprecated public Optional<MethodUsage> solveMethodAsUsage(String name, List<ResolvedType> argumentsTypes, Context invokationContext, List<ResolvedType> typeParameterValues)
Deprecated.- Specified by:
solveMethodAsUsage
in interfaceMethodUsageResolutionCapability
-
solveMethod
@Deprecated public SymbolReference<ResolvedMethodDeclaration> solveMethod(String name, List<ResolvedType> argumentsTypes, boolean staticOnly)
Deprecated.- Specified by:
solveMethod
in interfaceMethodResolutionCapability
-
getAllFields
public List<ResolvedFieldDeclaration> getAllFields()
- Specified by:
getAllFields
in interfaceResolvedReferenceTypeDeclaration
-
isAssignableBy
public boolean isAssignableBy(ResolvedType type)
- Specified by:
isAssignableBy
in interfaceResolvedReferenceTypeDeclaration
-
isAssignableBy
public boolean isAssignableBy(ResolvedReferenceTypeDeclaration other)
- Specified by:
isAssignableBy
in interfaceResolvedReferenceTypeDeclaration
-
canBeAssignedTo
public boolean canBeAssignedTo(ResolvedReferenceTypeDeclaration other)
- Specified by:
canBeAssignedTo
in interfaceResolvedReferenceTypeDeclaration
-
getAncestors
public List<ResolvedReferenceType> getAncestors(boolean acceptIncompleteList)
- Specified by:
getAncestors
in interfaceResolvedReferenceTypeDeclaration
-
getDeclaredMethods
public Set<ResolvedMethodDeclaration> getDeclaredMethods()
- Specified by:
getDeclaredMethods
in interfaceResolvedReferenceTypeDeclaration
-
hasDirectlyAnnotation
public boolean hasDirectlyAnnotation(String canonicalName)
- Specified by:
hasDirectlyAnnotation
in interfaceResolvedReferenceTypeDeclaration
-
getDeclaredAnnotations
public Set<ResolvedAnnotationDeclaration> getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotations
in interfaceResolvedReferenceTypeDeclaration
-
getName
public String getName()
- Specified by:
getName
in interfaceResolvedDeclaration
-
getTypeParameters
public List<ResolvedTypeParameterDeclaration> getTypeParameters()
- Specified by:
getTypeParameters
in interfaceResolvedTypeParametrizable
-
accessSpecifier
public AccessSpecifier accessSpecifier()
- Specified by:
accessSpecifier
in interfaceHasAccessSpecifier
-
asInterface
public ResolvedInterfaceDeclaration asInterface()
- Specified by:
asInterface
in interfaceResolvedTypeDeclaration
-
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.
-
containerType
public Optional<ResolvedReferenceTypeDeclaration> containerType()
- Specified by:
containerType
in interfaceResolvedTypeDeclaration
-
internalTypes
public Set<ResolvedReferenceTypeDeclaration> internalTypes()
- Specified by:
internalTypes
in interfaceResolvedTypeDeclaration
-
getInternalType
public ResolvedReferenceTypeDeclaration getInternalType(String name)
- Specified by:
getInternalType
in interfaceResolvedTypeDeclaration
-
hasInternalType
public boolean hasInternalType(String name)
- Specified by:
hasInternalType
in interfaceResolvedTypeDeclaration
-
getConstructors
public List<ResolvedConstructorDeclaration> getConstructors()
- Specified by:
getConstructors
in interfaceResolvedReferenceTypeDeclaration
-
-