Class JavaParserInterfaceDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
-
- com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserInterfaceDeclaration
-
- All Implemented Interfaces:
com.github.javaparser.resolution.declarations.AssociableToAST<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration>
,com.github.javaparser.resolution.declarations.HasAccessSpecifier
,com.github.javaparser.resolution.declarations.ResolvedDeclaration
,com.github.javaparser.resolution.declarations.ResolvedInterfaceDeclaration
,com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
,com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
,com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
,com.github.javaparser.symbolsolver.logic.TypeDeclarationWithResolutionCapabilities
public class JavaParserInterfaceDeclaration extends com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration implements com.github.javaparser.resolution.declarations.ResolvedInterfaceDeclaration, com.github.javaparser.symbolsolver.logic.TypeDeclarationWithResolutionCapabilities
- Author:
- Federico Tomassetti
-
-
Constructor Summary
Constructors Constructor Description JavaParserInterfaceDeclaration(com.github.javaparser.ast.body.ClassOrInterfaceDeclaration wrappedNode, com.github.javaparser.symbolsolver.model.resolution.TypeSolver typeSolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description com.github.javaparser.ast.AccessSpecifier
accessSpecifier()
com.github.javaparser.resolution.declarations.ResolvedInterfaceDeclaration
asInterface()
boolean
canBeAssignedTo(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other)
Optional<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration>
containerType()
boolean
equals(Object o)
List<com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration>
getAllFields()
List<com.github.javaparser.resolution.types.ResolvedReferenceType>
getAncestors(boolean acceptIncompleteList)
String
getClassName()
List<com.github.javaparser.resolution.declarations.ResolvedConstructorDeclaration>
getConstructors()
Context
getContext()
Set<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration>
getDeclaredMethods()
List<com.github.javaparser.resolution.types.ResolvedReferenceType>
getInterfacesExtended()
String
getName()
String
getPackageName()
String
getQualifiedName()
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.body.ClassOrInterfaceDeclaration
getWrappedNode()
Returns the JavaParser node associated with this JavaParserInterfaceDeclaration.boolean
hasDirectlyAnnotation(String canonicalName)
int
hashCode()
Set<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration>
internalTypes()
boolean
isAssignableBy(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other)
boolean
isAssignableBy(com.github.javaparser.resolution.types.ResolvedType type)
boolean
isInterface()
boolean
isTypeParameter()
com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration>
solveMethod(String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, boolean staticOnly)
com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration>
solveType(String name)
Deprecated.Optional<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration>
toAst()
String
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, hasName, isEnumConstant, isField, isMethod, isParameter, 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, getAllMethods, getAllNonStaticFields, getAllStaticFields, getAncestors, getDeclaredFields, getField, getVisibleField, getVisibleFields, hasAnnotation, hasField, hasVisibleField, isFunctionalInterface
-
-
-
-
Method Detail
-
getDeclaredMethods
public Set<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> getDeclaredMethods()
- Specified by:
getDeclaredMethods
in interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
getContext
public Context getContext()
-
getUsage
public com.github.javaparser.resolution.types.ResolvedType getUsage(com.github.javaparser.ast.Node node)
-
getName
public String getName()
- Specified by:
getName
in interfacecom.github.javaparser.resolution.declarations.ResolvedDeclaration
-
asInterface
public com.github.javaparser.resolution.declarations.ResolvedInterfaceDeclaration asInterface()
- Specified by:
asInterface
in interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
hasDirectlyAnnotation
public boolean hasDirectlyAnnotation(String canonicalName)
- Specified by:
hasDirectlyAnnotation
in interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
isInterface
public boolean isInterface()
- Specified by:
isInterface
in interfacecom.github.javaparser.resolution.declarations.ResolvedInterfaceDeclaration
- Specified by:
isInterface
in interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getInterfacesExtended
public List<com.github.javaparser.resolution.types.ResolvedReferenceType> getInterfacesExtended()
- Specified by:
getInterfacesExtended
in interfacecom.github.javaparser.resolution.declarations.ResolvedInterfaceDeclaration
-
getPackageName
public String getPackageName()
- Specified by:
getPackageName
in interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getClassName
public String getClassName()
- Specified by:
getClassName
in interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getQualifiedName
public String getQualifiedName()
- Specified by:
getQualifiedName
in interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
isAssignableBy
public boolean isAssignableBy(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other)
- Specified by:
isAssignableBy
in interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
isAssignableBy
public boolean isAssignableBy(com.github.javaparser.resolution.types.ResolvedType type)
- Specified by:
isAssignableBy
in interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
canBeAssignedTo
public boolean canBeAssignedTo(com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration other)
- Specified by:
canBeAssignedTo
in interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
isTypeParameter
public boolean isTypeParameter()
- Specified by:
isTypeParameter
in interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getAllFields
public List<com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration> getAllFields()
- Specified by:
getAllFields
in interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
solveType
@Deprecated public com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration> solveType(String name)
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 com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedMethodDeclaration> solveMethod(String name, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, boolean staticOnly)
- Specified by:
solveMethod
in interfacecom.github.javaparser.symbolsolver.logic.TypeDeclarationWithResolutionCapabilities
-
getAncestors
public List<com.github.javaparser.resolution.types.ResolvedReferenceType> getAncestors(boolean acceptIncompleteList)
- Specified by:
getAncestors
in interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
getTypeParameters
public List<com.github.javaparser.resolution.declarations.ResolvedTypeParameterDeclaration> getTypeParameters()
- Specified by:
getTypeParameters
in interfacecom.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
-
getWrappedNode
public com.github.javaparser.ast.body.ClassOrInterfaceDeclaration getWrappedNode()
Returns the JavaParser node associated with this JavaParserInterfaceDeclaration.- Returns:
- A visitable JavaParser node wrapped by this object.
-
accessSpecifier
public com.github.javaparser.ast.AccessSpecifier accessSpecifier()
- Specified by:
accessSpecifier
in interfacecom.github.javaparser.resolution.declarations.HasAccessSpecifier
-
internalTypes
public Set<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> internalTypes()
- Specified by:
internalTypes
in interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
containerType
public Optional<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> containerType()
- Specified by:
containerType
in interfacecom.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
-
getConstructors
public List<com.github.javaparser.resolution.declarations.ResolvedConstructorDeclaration> getConstructors()
- Specified by:
getConstructors
in interfacecom.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
-
toAst
public Optional<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration> toAst()
- Specified by:
toAst
in interfacecom.github.javaparser.resolution.declarations.AssociableToAST<com.github.javaparser.ast.body.ClassOrInterfaceDeclaration>
-
-