Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse JDT
Release 3.5

org.eclipse.jdt.core.dom
Class ChildPropertyDescriptor


java.lang.Object
  extended by 

org.eclipse.jdt.core.dom.StructuralPropertyDescriptor
      extended by 
org.eclipse.jdt.core.dom.ChildPropertyDescriptor

public final class ChildPropertyDescriptor
extends StructuralPropertyDescriptor

Descriptor for a child property of an AST node. A child property is one whose value is an ASTNode.

Since:
3.0
See Also:
ASTNode.getStructuralProperty(StructuralPropertyDescriptor), ASTNode.setStructuralProperty(StructuralPropertyDescriptor, Object)
Restriction:
This class is not intended to be instantiated by clients.

Method Summary
 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.
 
Methods inherited from class org.eclipse.jdt.core.dom. StructuralPropertyDescriptor
getId, getNodeClass, isChildListProperty, isChildProperty, isSimpleProperty, toString
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getChildType

public final 
Class getChildType()
Returns the child type of this property.

For example, for a node type like CompilationUnit, the "package" property returns PackageDeclaration.class.

Returns:
the child type of the property

isMandatory

public final boolean isMandatory()
Returns whether this property is mandatory. A property value is not allowed to be null if it is mandatory.

Returns:
true if the property is mandatory, and false if it is may be null

cycleRisk

public final boolean cycleRisk()
Returns whether this property is vulnerable to cycles.

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.

Returns:
true if cycles are possible, and false if cycles are impossible

Eclipse JDT
Release 3.5

Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire