Package org.eclipse.cdt.core.dom.ast.cpp
Interface ICPPClassType
-
- All Superinterfaces:
Cloneable
,org.eclipse.core.runtime.IAdaptable
,IBinding
,ICompositeType
,ICPPBinding
,IType
- All Known Subinterfaces:
ICPPClassSpecialization
,ICPPClassTemplate
,ICPPClassTemplatePartialSpecialization
,ICPPClassTemplatePartialSpecializationSpecialization
,ICPPTemplateTemplateParameter
public interface ICPPClassType extends ICompositeType, ICPPBinding
Represents a C++ class.- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
-
Field Summary
Fields Modifier and Type Field Description static ICPPClassType[]
EMPTY_CLASS_ARRAY
static int
k_class
static int
v_private
static int
v_protected
static int
v_public
-
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IBinding
EMPTY_BINDING_ARRAY
-
Fields inherited from interface org.eclipse.cdt.core.dom.ast.ICompositeType
k_struct, k_union
-
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IType
EMPTY_TYPE_ARRAY, TYPE_MATCHER
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IField
findField(String name)
The method is restated here to point out that this method looks through the inheritance tree of this class while looking for a field with the given name.ICPPMethod[]
getAllDeclaredMethods()
Returns a list of ICPPMethod objects representing all method explicitly declared by this class and inherited from base classes.ICPPBase[]
getBases()
Returns an array of base class relationships.ICPPConstructor[]
getConstructors()
Returns an array of ICPPConstructor objects representing the constructors for this class.ICPPField[]
getDeclaredFields()
Returns a list of ICPPField objects representing fields declared in this class.ICPPMethod[]
getDeclaredMethods()
Returns a list of ICPPMethod objects representing all methods explicitly declared by this class.IField[]
getFields()
The method is restated here just to point out that this method returns a list of ICPPField objects representing all fields, declared or inherited.IBinding[]
getFriends()
Returns an array of bindings for those classes/functions declared as friends of this class.ICPPMethod[]
getMethods()
Returns a list of ICPPMethod objects representing all methods defined for this class including those declared, inherited, or generated (e.g.ICPPClassType[]
getNestedClasses()
Returns an array of nested classes/structuresICPPUsingDeclaration[]
getUsingDeclarations()
Returns an array of using declarations in this class.int
getVisibility(IBinding member)
Returns the access specifier of themember
.boolean
isFinal()
Returns whether this type is declared final.boolean
isNoDiscard()
Returns whether this type is declared 'nodiscard'.-
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IBinding
getLinkage, getName, getNameCharArray, getOwner, getScope
-
Methods inherited from interface org.eclipse.cdt.core.dom.ast.ICompositeType
getCompositeScope, getKey, isAnonymous
-
Methods inherited from interface org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding
getQualifiedName, getQualifiedNameCharArray, isGloballyQualified
-
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IType
clone, isSameType
-
-
-
-
Field Detail
-
EMPTY_CLASS_ARRAY
static final ICPPClassType[] EMPTY_CLASS_ARRAY
-
k_class
static final int k_class
- See Also:
- Constant Field Values
-
v_public
static final int v_public
- Since:
- 5.5
- See Also:
- Constant Field Values
-
v_protected
static final int v_protected
- Since:
- 5.5
- See Also:
- Constant Field Values
-
v_private
static final int v_private
- Since:
- 5.5
- See Also:
- Constant Field Values
-
-
Method Detail
-
getBases
ICPPBase[] getBases()
Returns an array of base class relationships. The returned array is empty if there are none.
-
getFields
IField[] getFields()
The method is restated here just to point out that this method returns a list of ICPPField objects representing all fields, declared or inherited.- Specified by:
getFields
in interfaceICompositeType
- Returns:
- List of IField
-
findField
IField findField(String name)
The method is restated here to point out that this method looks through the inheritance tree of this class while looking for a field with the given name. If no field is found,null
is returned, if the name is found to be ambiguous a IProblemBinding is returned.- Specified by:
findField
in interfaceICompositeType
- Parameters:
name
-
-
getDeclaredFields
ICPPField[] getDeclaredFields()
Returns a list of ICPPField objects representing fields declared in this class. It does not include fields inherited from base classes.- Returns:
- List of ICPPField
-
getMethods
ICPPMethod[] getMethods()
Returns a list of ICPPMethod objects representing all methods defined for this class including those declared, inherited, or generated (e.g. default constructors and the like).- Returns:
- List of ICPPMethod
-
getAllDeclaredMethods
ICPPMethod[] getAllDeclaredMethods()
Returns a list of ICPPMethod objects representing all method explicitly declared by this class and inherited from base classes. It does not include automatically generated methods.- Returns:
- List of ICPPMethod
-
getDeclaredMethods
ICPPMethod[] getDeclaredMethods()
Returns a list of ICPPMethod objects representing all methods explicitly declared by this class. It does not include inherited methods or automatically generated methods.- Returns:
- List of ICPPMethod
-
getConstructors
ICPPConstructor[] getConstructors()
Returns an array of ICPPConstructor objects representing the constructors for this class. This list includes both declared and implicit constructors.
-
getFriends
IBinding[] getFriends()
Returns an array of bindings for those classes/functions declared as friends of this class.
-
getNestedClasses
ICPPClassType[] getNestedClasses()
Returns an array of nested classes/structures
-
getUsingDeclarations
ICPPUsingDeclaration[] getUsingDeclarations()
Returns an array of using declarations in this class.- Since:
- 6.3
-
isFinal
boolean isFinal()
Returns whether this type is declared final.- Since:
- 5.5
-
getVisibility
int getVisibility(IBinding member)
Returns the access specifier of themember
.- Parameters:
member
- The binding of the member to get the visibility for.member
must be a member of this class.- Returns:
- the visibility of the specified member.
- Throws:
IllegalArgumentException
- ifmember
is not a member of this class.- Since:
- 5.5
-
isNoDiscard
boolean isNoDiscard()
Returns whether this type is declared 'nodiscard'.- Since:
- 7.0
-
-