Package org.eclipse.jdt.core.dom
Class SimplePropertyDescriptor
- java.lang.Object
-
- org.eclipse.jdt.core.dom.StructuralPropertyDescriptor
-
- org.eclipse.jdt.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 asint
orboolean
) or some simple value type (such asString
orInfixExpression.Operator
).- 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class
getValueType()
Returns the value 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
-
-
-
-
Method Detail
-
getValueType
public 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 benull
if it is mandatory.- Returns:
true
if the property is mandatory, andfalse
if it is may benull
-
-