107107 .setReturnType (String class )
108108
109109// Generate class names which are condensed at the expense of
110- // being mangled and not as readable by a human . This is
110+ // being mangled and not as readable by humans . This is
111111// useful if you have a complicated descriptor which creates
112- // class names too long to be compiled. (optional, disabled by default)
112+ // class names too long to be compiled. (disabled by default)
113113 .enableCondensedClassNames ()
114114
115+ // Provide a custom name generator instance, to be consulted
116+ // when creating the generated source code.
117+ //
118+ // The `DefaultNameGenerator` implementation will leave names
119+ // as they are. A more compact form can be achieved by using
120+ // the `TinyNameGenerator`, which will try to shorten names
121+ // as much as possible. For more consistent naming the
122+ // `HashedNameGenerator` can be used, which makes use of the
123+ // MD5 hashing algorithm.
124+ .useCustomNameGenerator (NameGenerator generator )
125+
126+ // Disable the printing of timestamps in the generated source
127+ // code. This will eliminate changes between successive executions
128+ // so long as the same version of the tool is used each time.
129+ .disableTimestamps ()
130+
115131// Complete the finished descriptor, returning a new
116132// `Descriptor` object. (**required**)
117133.build ()
@@ -546,8 +562,7 @@ public interface MyHelper {
546562 *
547563 * A method may specify a block chain by annotating any number
548564 * of parameters with `@BlockChain`. The parameter **must** be of
549- * type `AtomicReference`, and the annotation must include the
550- * type of the block, matching the generic signature of the reference.
565+ * type `AtomicReference`.
551566 *
552567 * The helper will be introspected like the current type, and the
553568 * chain will be constructed moving from the leftmost parameter
@@ -569,15 +584,14 @@ interface MyHelper {
569584
570585 @ Last
571586 String startBlock (
572- int paramA , @ BlockChain ( Alpha . class ) AtomicReference <Alpha > helperA ,
573- int paramB , @ BlockChain ( Beta . class ) AtomicReference <Beta > helperB
587+ int paramA , @ BlockChain AtomicReference <Alpha > helperA ,
588+ int paramB , @ BlockChain AtomicReference <Beta > helperB
574589 );
575590}
576591
577592// Marks a method parameter as a container for another block's helper.
578- // The types must match the generic signature of the `AtomicReference` object,
579- // or else an error will be thrown at runtime.
580- @ BlockChain (Class <?> type )
593+ // The parameter **must** be of type `AtomicReference`.
594+ @ BlockChain
581595
582596
583597
0 commit comments