diff options
Diffstat (limited to 'org.eclipse.cdt.codan.extension/src/org/eclipse/cdt/codan/extension/PropertyState.java')
-rw-r--r-- | org.eclipse.cdt.codan.extension/src/org/eclipse/cdt/codan/extension/PropertyState.java | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/org.eclipse.cdt.codan.extension/src/org/eclipse/cdt/codan/extension/PropertyState.java b/org.eclipse.cdt.codan.extension/src/org/eclipse/cdt/codan/extension/PropertyState.java index 95e334f..53462b6 100644 --- a/org.eclipse.cdt.codan.extension/src/org/eclipse/cdt/codan/extension/PropertyState.java +++ b/org.eclipse.cdt.codan.extension/src/org/eclipse/cdt/codan/extension/PropertyState.java @@ -12,18 +12,38 @@ package org.eclipse.cdt.codan.extension; import org.eclipse.cdt.core.dom.ast.IASTNode; -public abstract class PropertyState { - +/** + * A Property State represents the state of a temporal property. + * One or more Property States comprise an {@link IPropertyFSM}. + * Statements and expressions in the AST can cause a transition between + * states. + */ +public abstract class PropertyState { private String name; + /** + * Constructs an anonymous Property State. + */ public PropertyState() { this(null); } + /** + * Constructs a Property State with an optional name used + * to label it. + * @param name - some meaningful name + */ public PropertyState(String name) { this.name = name; } + /** + * Called while processing a control flow. Determine if node's + * contents cause this state to transition to another state according + * to the rules of your temporal property's finite state machine. + * @param node - the IASTNode currently being processed + * @return the PropertyState we transition to, or this if no transition + */ public abstract PropertyState transition(IASTNode node); @Override |