public final class ChildPropertyDescriptor extends StructuralPropertyDescriptor
ASTNode
.ASTNode.getStructuralProperty(StructuralPropertyDescriptor)
,
ASTNode.setStructuralProperty(StructuralPropertyDescriptor, Object)
Modifier and Type | Method and Description |
---|---|
boolean |
cycleRisk()
Returns whether this property is vulnerable to cycles.
|
Class |
getChildType()
Returns the child type of this property.
|
boolean |
isMandatory()
Returns whether this property is mandatory.
|
getId, getNodeClass, isChildListProperty, isChildProperty, isSimpleProperty, toString
public final Class getChildType()
For example, for a node type like CompilationUnit,
the "package" property returns PackageDeclaration.class
.
public final boolean isMandatory()
null
if it is mandatory.true
if the property is mandatory,
and false
if it is may be null
public final boolean cycleRisk()
A property is vulnerable to cycles if a node of the owning
type (that is, the type that owns this property) could legally
appear in the AST subtree below this property. For example,
the body property of a
MethodDeclaration
node
admits a body which might include statement that embeds
another MethodDeclaration
node.
On the other hand, the name property of a
MethodDeclaration node admits only names, and thereby excludes
another MethodDeclaration node.
true
if cycles are possible,
and false
if cycles are impossible
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.