Class JavaParserClassDeclaration
java.lang.Object
com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
com.github.javaparser.symbolsolver.logic.AbstractClassDeclaration
com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserClassDeclaration
- All Implemented Interfaces:
AssociableToAST<Node>,HasAccessSpecifier,ResolvedClassDeclaration,ResolvedDeclaration,ResolvedReferenceTypeDeclaration,ResolvedTypeDeclaration,ResolvedTypeParametrizable,MethodUsageResolutionCapability,MethodResolutionCapability
public class JavaParserClassDeclaration
extends AbstractClassDeclaration
implements 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
ConstructorsConstructorDescriptionJavaParserClassDeclaration(ClassOrInterfaceDeclaration wrappedNode, TypeSolver typeSolver) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleangetAncestors(boolean acceptIncompleteList)Deprecated.getName()Returns the JavaParser node associated with this JavaParserClassDeclaration.booleanhasDirectlyAnnotation(String canonicalName)inthashCode()booleanbooleanisAssignableBy(ResolvedType type)booleanbooleanprotected ResolvedReferenceTypeobject()An implementation of the Object class.solveMethod(String name, List<ResolvedType> parameterTypes)solveMethod(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.AbstractClassDeclaration
asClass, getAllInterfaces, getAllSuperClasses, hasNameMethods 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.ResolvedClassDeclaration
isClassMethods inherited from interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
asEnumConstant, asField, asMethod, asParameter, asPattern, isEnumConstant, isField, isMethod, isParameter, isPattern, isVariableMethods 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, asEnum, asInterface, asType, asTypeParameter, getId, getInternalType, hasInternalType, isAnnotation, isAnonymousClass, isEnum, isTypeMethods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
isGeneric
-
Constructor Details
-
JavaParserClassDeclaration
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
toString
-
getAllFields
- Specified by:
getAllFieldsin interfaceResolvedReferenceTypeDeclaration
-
solveMethod
public SymbolReference<ResolvedMethodDeclaration> solveMethod(String name, List<ResolvedType> parameterTypes) -
solveMethodAsUsage
public Optional<MethodUsage> solveMethodAsUsage(String name, List<ResolvedType> argumentTypes, Context invocationContext, List<ResolvedType> typeParameters)- Specified by:
solveMethodAsUsagein interfaceMethodUsageResolutionCapability
-
getContext
Deprecated.This method is deprecated because the context is an implementation detail that should not be exposed. Ideally this method should become private. For this reason all further usages of this method are discouraged. -
getUsage
-
getName
- Specified by:
getNamein interfaceResolvedDeclaration
-
getSuperClass
- Specified by:
getSuperClassin interfaceResolvedClassDeclaration
-
getInterfaces
- Specified by:
getInterfacesin interfaceResolvedClassDeclaration
-
getConstructors
- Specified by:
getConstructorsin interfaceResolvedClassDeclaration- Specified by:
getConstructorsin interfaceResolvedReferenceTypeDeclaration
-
hasDirectlyAnnotation
- Specified by:
hasDirectlyAnnotationin interfaceResolvedReferenceTypeDeclaration
-
isInterface
public boolean isInterface()- Specified by:
isInterfacein interfaceResolvedTypeDeclaration
-
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
-
solveType
Deprecated.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
-
getAncestors
- Specified by:
getAncestorsin interfaceResolvedReferenceTypeDeclaration
-
getDeclaredMethods
- Specified by:
getDeclaredMethodsin interfaceResolvedReferenceTypeDeclaration
-
getTypeParameters
- Specified by:
getTypeParametersin interfaceResolvedTypeParametrizable
-
getWrappedNode
Returns the JavaParser node associated with this JavaParserClassDeclaration.- Returns:
- A visitable JavaParser node wrapped by this object.
-
accessSpecifier
- Specified by:
accessSpecifierin interfaceHasAccessSpecifier
-
toAst
- Specified by:
toAstin interfaceAssociableToAST<Node>
-
object
Description copied from class:AbstractClassDeclarationAn implementation of the Object class.- Specified by:
objectin classAbstractClassDeclaration
-
internalTypes
- Specified by:
internalTypesin interfaceResolvedTypeDeclaration
-
containerType
- Specified by:
containerTypein interfaceResolvedTypeDeclaration
-