Package org.eclipse.jdt.core.dom
Class StructuralPropertyDescriptor
- java.lang.Object
-
- org.eclipse.jdt.core.dom.StructuralPropertyDescriptor
-
- Direct Known Subclasses:
ChildListPropertyDescriptor
,ChildPropertyDescriptor
,SimplePropertyDescriptor
public abstract class StructuralPropertyDescriptor extends Object
Abstract base class for property descriptors of AST nodes. There are three kinds of properties:- simple properties (
SimplePropertyDescriptor
) - properties where the value is a primitive (int, boolean) or simple (String, InfixExprsssion.Operator) type other than an AST node; for example, the identifier of aSimpleName
- child properties (
ChildPropertyDescriptor
) - properties whose value is another AST node; for example, the name of aMethodDeclaration
- child list properties (
ChildListPropertyDescriptor
) - properties where the value is a list of AST nodes; for example, the statements of aBlock
- Since:
- 3.0
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getId()
Returns the id of this property.Class
getNodeClass()
Returns the AST node type that owns this property.boolean
isChildListProperty()
Returns whether this property is a child list property (instance ofChildListPropertyDescriptor
.boolean
isChildProperty()
Returns whether this property is a child property (instance ofChildPropertyDescriptor
.boolean
isSimpleProperty()
Returns whether this property is a simple property (instance ofSimplePropertyDescriptor
.String
toString()
Returns a string suitable for debug purposes.
-
-
-
Method Detail
-
getId
public final String getId()
Returns the id of this property.- Returns:
- the property id
-
getNodeClass
public final Class getNodeClass()
Returns the AST node type that owns this property.For example, for all properties of the node type TypeDeclaration, this method returns
TypeDeclaration.class
.- Returns:
- the node type that owns this property
-
isSimpleProperty
public final boolean isSimpleProperty()
Returns whether this property is a simple property (instance ofSimplePropertyDescriptor
.- Returns:
true
if this is a simple property, andfalse
otherwise
-
isChildProperty
public final boolean isChildProperty()
Returns whether this property is a child property (instance ofChildPropertyDescriptor
.- Returns:
true
if this is a child property, andfalse
otherwise
-
isChildListProperty
public final boolean isChildListProperty()
Returns whether this property is a child list property (instance ofChildListPropertyDescriptor
.- Returns:
true
if this is a child list property, andfalse
otherwise
-
-