org.eclipse.wst.jsdt.core.dom
Class SimplePropertyDescriptor

java.lang.Object
  extended by org.eclipse.wst.jsdt.core.dom.StructuralPropertyDescriptor
      extended by org.eclipse.wst.jsdt.core.dom.SimplePropertyDescriptor

public final class SimplePropertyDescriptor
extends StructuralPropertyDescriptor

Descriptor for a simple property of an AST node. A simple property is one whose value is a primitive type (such as int or boolean) or some simple value type (such as String or InfixExpression.Operator).

See Also:
ASTNode.getStructuralProperty(StructuralPropertyDescriptor), Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

Method Summary
 java.lang.Class getValueType()
          Returns the value type of this property.
 boolean isMandatory()
          Returns whether this property is mandatory.
 
Methods inherited from class org.eclipse.wst.jsdt.core.dom.StructuralPropertyDescriptor
getId, getNodeClass, isChildListProperty, isChildProperty, isSimpleProperty, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getValueType

public java.lang.Class getValueType()
Returns the value type of this property.

For example, for a node type like SingleVariableDeclaration, the "modifiers" property returns int.class.

Returns:
the value type of the property

isMandatory

public 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