org.kite9.diagram.builders.formats.fsm
Class EnumWithAnnotationFSMDataProvider
java.lang.Object
org.kite9.diagram.builders.formats.fsm.EnumWithAnnotationFSMDataProvider
- All Implemented Interfaces:
- FSMDataProvider
public class EnumWithAnnotationFSMDataProvider
- extends Object
- implements FSMDataProvider
This class can be used where your state transition methods are annotated with custom before and after annotations.
- Author:
- robmoffat
|
Constructor Summary |
EnumWithAnnotationFSMDataProvider(DiagramBuilder db,
Field f,
Class<? extends Enum<?>> enumClass,
Class<? extends Annotation> beforeAnnotation,
Class<? extends Annotation> afterAnnotation)
Creates a FSMDataProvider which examines methods having a state change, and before / after
state change annotations. |
EnumWithAnnotationFSMDataProvider(NounFactory nf,
ProjectModel pm,
Field f,
Class<? extends Enum<?>> enumClass,
ClassLoader cl,
Class<? extends Annotation> beforeAnnotation,
String beforeField,
Class<? extends Annotation> afterAnnotation,
String afterField)
This more involved constructor allows you to choose a noun factory and project model, and
use annotation fields other than the default 'value' field. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnumWithAnnotationFSMDataProvider
public EnumWithAnnotationFSMDataProvider(DiagramBuilder db,
Field f,
Class<? extends Enum<?>> enumClass,
Class<? extends Annotation> beforeAnnotation,
Class<? extends Annotation> afterAnnotation)
- Creates a FSMDataProvider which examines methods having a state change, and before / after
state change annotations.
- Parameters:
db - Diagram Builder (used for project model and noun factory)f - Field which state change occurs onenumClass - Class of the fieldbeforeAnnotation - Annotation used to mark up 'before' states (field containing those states is assumed to be an array of the enumeration, and called 'value'.afterAnnotation - Annotation used to mark up 'after' states (field containing those states is assumed to be an array of the enumeration, and called 'value'.
EnumWithAnnotationFSMDataProvider
public EnumWithAnnotationFSMDataProvider(NounFactory nf,
ProjectModel pm,
Field f,
Class<? extends Enum<?>> enumClass,
ClassLoader cl,
Class<? extends Annotation> beforeAnnotation,
String beforeField,
Class<? extends Annotation> afterAnnotation,
String afterField)
- This more involved constructor allows you to choose a noun factory and project model, and
use annotation fields other than the default 'value' field.
getStates
public SimpleNoun[] getStates()
- Specified by:
getStates in interface FSMDataProvider
getTransitions
public Transition[] getTransitions()
- Specified by:
getTransitions in interface FSMDataProvider
createTransition
protected Transition createTransition(MemberHandle handle)
getDefinedNouns
protected SimpleNoun[] getDefinedNouns(Member m,
Class<? extends Annotation> annotation,
String field)
getDefinedValues
protected Enum<?>[] getDefinedValues(AnnotatedElement m,
Class<? extends Annotation> annotation,
String field)
getTransitionObject
protected SimpleNoun getTransitionObject(Object m)
Copyright © 2011. All Rights Reserved.