Class AbstractClassDeclaration
- java.lang.Object
-
- com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
-
- com.github.javaparser.symbolsolver.logic.AbstractClassDeclaration
-
- All Implemented Interfaces:
AssociableToAST
,HasAccessSpecifier
,ResolvedClassDeclaration
,ResolvedDeclaration
,ResolvedReferenceTypeDeclaration
,ResolvedTypeDeclaration
,ResolvedTypeParametrizable
,MethodResolutionCapability
- Direct Known Subclasses:
JavaParserAnonymousClassDeclaration
,JavaParserClassDeclaration
,JavassistClassDeclaration
,ReflectionClassDeclaration
public abstract class AbstractClassDeclaration extends AbstractTypeDeclaration implements ResolvedClassDeclaration, MethodResolutionCapability
A common ancestor for all ClassDeclarations.- 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 Constructor Description AbstractClassDeclaration()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ResolvedClassDeclaration
asClass()
Return this as a ClassDeclaration or throw UnsupportedOperationException.List<ResolvedReferenceType>
getAllInterfaces()
Return all the interfaces implemented by this class, either directly or indirectly, including the interfaces extended by interfaces it implements.List<ResolvedReferenceType>
getAllSuperClasses()
Get all superclasses, with all the type typeParametersValues expressed as functions of the type typeParametersValues of this declaration.boolean
hasName()
Anonymous classes do not have a name, for example.protected abstract ResolvedReferenceType
object()
An implementation of the Object class.-
Methods inherited from class com.github.javaparser.symbolsolver.logic.AbstractTypeDeclaration
getAllMethods, isFunctionalInterface
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.javaparser.resolution.declarations.AssociableToAST
toAst, toAst
-
Methods inherited from interface com.github.javaparser.resolution.declarations.HasAccessSpecifier
accessSpecifier
-
Methods inherited from interface com.github.javaparser.resolution.logic.MethodResolutionCapability
solveMethod
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedClassDeclaration
getConstructors, getInterfaces, getSuperClass, isClass
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedDeclaration
asEnumConstant, asField, asMethod, asParameter, asPattern, getName, isEnumConstant, isField, isMethod, isParameter, isPattern, isVariable
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration
asReferenceType, canBeAssignedTo, findTypeParameter, getAllAncestors, getAllAncestors, getAllFields, getAllMethods, getAllNonStaticFields, getAllStaticFields, getAncestors, getAncestors, getDeclaredFields, getDeclaredMethods, getField, getVisibleField, getVisibleFields, hasAnnotation, hasDirectlyAnnotation, hasField, hasVisibleField, isAssignableBy, isAssignableBy, isFunctionalInterface, isJavaLangEnum, isJavaLangObject, isReferenceType
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration
asAnnotation, asEnum, asInterface, asType, asTypeParameter, containerType, getClassName, getId, getInternalType, getPackageName, getQualifiedName, hasInternalType, internalTypes, isAnnotation, isAnonymousClass, isEnum, isInterface, isType, isTypeParameter
-
Methods inherited from interface com.github.javaparser.resolution.declarations.ResolvedTypeParametrizable
getTypeParameters, isGeneric
-
-
-
-
Method Detail
-
hasName
public boolean hasName()
Description copied from interface:ResolvedDeclaration
Anonymous classes do not have a name, for example.- Specified by:
hasName
in interfaceResolvedDeclaration
-
getAllSuperClasses
public final List<ResolvedReferenceType> getAllSuperClasses()
Description copied from interface:ResolvedClassDeclaration
Get all superclasses, with all the type typeParametersValues expressed as functions of the type typeParametersValues of this declaration.- Specified by:
getAllSuperClasses
in interfaceResolvedClassDeclaration
-
getAllInterfaces
public final List<ResolvedReferenceType> getAllInterfaces()
Description copied from interface:ResolvedClassDeclaration
Return all the interfaces implemented by this class, either directly or indirectly, including the interfaces extended by interfaces it implements.Get all interfaces, with all the type typeParametersValues expressed as functions of the type typeParametersValues of this declaration.
- Specified by:
getAllInterfaces
in interfaceResolvedClassDeclaration
-
asClass
public final ResolvedClassDeclaration asClass()
Description copied from interface:ResolvedTypeDeclaration
Return this as a ClassDeclaration or throw UnsupportedOperationException.- Specified by:
asClass
in interfaceResolvedTypeDeclaration
-
object
protected abstract ResolvedReferenceType object()
An implementation of the Object class.
-
-