Class JavaParserInterfaceDeclaration
java.lang.Object
com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserInterfaceDeclaration
- All Implemented Interfaces:
AssociableToAST<ClassOrInterfaceDeclaration>,HasAccessSpecifier,ResolvedDeclaration,ResolvedInterfaceDeclaration,ResolvedReferenceTypeDeclaration,ResolvedTypeDeclaration,ResolvedTypeParametrizable,MethodUsageResolutionCapability,MethodResolutionCapability
public class JavaParserInterfaceDeclaration
extends AbstractTypeDeclaration
implements ResolvedInterfaceDeclaration, MethodResolutionCapability, MethodUsageResolutionCapability
- 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
ConstructorsConstructorDescriptionJavaParserInterfaceDeclaration(ClassOrInterfaceDeclaration wrappedNode, TypeSolver typeSolver) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleangetAncestors(boolean acceptIncompleteList)getName()Returns the JavaParser node associated with this JavaParserInterfaceDeclaration.booleanhasDirectlyAnnotation(String canonicalName)inthashCode()booleanbooleanisAssignableBy(ResolvedType type)booleanbooleansolveMethod(String name, List<ResolvedType> argumentsTypes, boolean staticOnly)solveMethodAsUsage(String name, List<ResolvedType> argumentTypes, Context invocationContext, List<ResolvedType> typeParameters)Deprecated.toAst()toString()Methods inherited from class com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
getAllMethods, isFunctionalInterfaceMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
asEnumConstant, asField, asMethod, asParameter, asPattern, hasName, isEnumConstant, isField, isMethod, isParameter, isPattern, isVariableMethods inherited from interface com.github.javaparser.resolution.declarations.ResolvedInterfaceDeclaration
getAllInterfacesExtendedMethods inherited from interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
asReferenceType, findTypeParameter, getAllAncestors, getAllAncestors, getAllMethods, getAllNonStaticFields, getAllStaticFields, getAncestors, getDeclaredFields, getField, getVisibleField, getVisibleFields, hasAnnotation, hasField, hasVisibleField, isFunctionalInterface, isJavaLangEnum, isJavaLangObjectMethods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
asAnnotation, asClass, asEnum, asType, asTypeParameter, getId, getInternalType, hasInternalType, isAnnotation, isAnonymousClass, isClass, isEnum, isTypeMethods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
isGeneric
-
Constructor Details
-
JavaParserInterfaceDeclaration
public JavaParserInterfaceDeclaration(ClassOrInterfaceDeclaration wrappedNode, TypeSolver typeSolver)
-
-
Method Details
-
getDeclaredMethods
- Specified by:
getDeclaredMethodsin interfaceResolvedReferenceTypeDeclaration
-
getContext
-
getUsage
-
equals
-
hashCode
public int hashCode() -
getName
- Specified by:
getNamein interfaceResolvedDeclaration
-
asInterface
- Specified by:
asInterfacein interfaceResolvedTypeDeclaration
-
hasDirectlyAnnotation
- Specified by:
hasDirectlyAnnotationin interfaceResolvedReferenceTypeDeclaration
-
isInterface
public boolean isInterface()- Specified by:
isInterfacein interfaceResolvedInterfaceDeclaration- Specified by:
isInterfacein interfaceResolvedTypeDeclaration
-
getInterfacesExtended
- Specified by:
getInterfacesExtendedin interfaceResolvedInterfaceDeclaration
-
getPackageName
- Specified by:
getPackageNamein interfaceResolvedTypeDeclaration
-
getClassName
- Specified by:
getClassNamein interfaceResolvedTypeDeclaration
-
getQualifiedName
- Specified by:
getQualifiedNamein interfaceResolvedTypeDeclaration
-
isAssignableBy
- Specified by:
isAssignableByin interfaceResolvedReferenceTypeDeclaration
-
isAssignableBy
- Specified by:
isAssignableByin interfaceResolvedReferenceTypeDeclaration
-
canBeAssignedTo
- Specified by:
canBeAssignedToin interfaceResolvedReferenceTypeDeclaration
-
isTypeParameter
public boolean isTypeParameter()- Specified by:
isTypeParameterin interfaceResolvedTypeDeclaration
-
getAllFields
- Specified by:
getAllFieldsin interfaceResolvedReferenceTypeDeclaration
-
toString
-
solveType
Deprecated.This method is deprecated because it receives the TypesSolver as a parameter. Eventually we would like to remove all usages of TypeSolver as a parameter. Also, resolution should move out of declarations, so that they are pure declarations and the resolution should work for JavaParser, Reflection and Javassist classes in the same way and not be specific to the three implementations. -
solveMethod
public SymbolReference<ResolvedMethodDeclaration> solveMethod(String name, List<ResolvedType> argumentsTypes, boolean staticOnly)- Specified by:
solveMethodin interfaceMethodResolutionCapability
-
solveMethodAsUsage
public Optional<MethodUsage> solveMethodAsUsage(String name, List<ResolvedType> argumentTypes, Context invocationContext, List<ResolvedType> typeParameters)- Specified by:
solveMethodAsUsagein interfaceMethodUsageResolutionCapability
-
getAncestors
- Specified by:
getAncestorsin interfaceResolvedReferenceTypeDeclaration
-
getTypeParameters
- Specified by:
getTypeParametersin interfaceResolvedTypeParametrizable
-
getWrappedNode
Returns the JavaParser node associated with this JavaParserInterfaceDeclaration.- Returns:
- A visitable JavaParser node wrapped by this object.
-
accessSpecifier
- Specified by:
accessSpecifierin interfaceHasAccessSpecifier
-
internalTypes
- Specified by:
internalTypesin interfaceResolvedTypeDeclaration
-
containerType
- Specified by:
containerTypein interfaceResolvedTypeDeclaration
-
getConstructors
- Specified by:
getConstructorsin interfaceResolvedReferenceTypeDeclaration
-
toAst
- Specified by:
toAstin interfaceAssociableToAST<ClassOrInterfaceDeclaration>
-