1 /**
2 This module contains all attributes that can be used by Jumped.
3 
4 These attributes are the main way to control the behaviour of a program written
5 using the Jumped framework.
6 
7 Each of these attributes can be added to a function, or to other attributes.
8 They are detected recursively.
9 */
10 module jumped.attributes;
11 
12 /**
13 An annotation that specifies that the given function can be instantiated as a bean.
14 
15 When this annotation is attached to a method, Jumped will call the method in
16 order to get an instance of the bean.
17 */
18 struct bean; // @suppress(dscanner.style.phobos_naming_convention)
19 
20 /**
21 An annotation that specifies that the given class can be instantiated without
22 needing a special method with the `@bean` annotation.
23 */
24 struct component; // @suppress(dscanner.style.phobos_naming_convention)
25 
26 /**
27 An annotation that specifies that the given function should be executed when the
28 program is started.
29 
30 When this annotation is attached to multiple different methods, the order of
31 execution is unspecified.
32 */
33 struct startup; // @suppress(dscanner.style.phobos_naming_convention)
34 
35 /**
36 An annotation that specifies that the given function should be executed when
37 the program is stopped.
38 
39 Any functions annotated with this attribute will always be executed when the
40 program has stopped, regardless whether an uncaught exception was encountered
41 earlier or not.
42 */
43 struct shutdown; // @suppress(dscanner.style.phobos_naming_convention)
44 
45 /**
46 An annotation that specifies that the given function should be executed when
47 the program is stopped.
48 
49 Any functions annotated with this attribute will only be executed when the
50 program has stopped and no uncaught exception has occured.
51 */
52 struct shutdownOnSuccess; // @suppress(dscanner.style.phobos_naming_convention)
53 
54 /**
55 An annotation that specifies that the given function should be executed when
56 the program is stopped.
57 
58 Any functions annotated with this attribute will only be executed when the
59 program has stopped and an oncaught exception has occured.
60 */
61 struct shutdownOnFailure; // @suppress(dscanner.style.phobos_naming_convention)