@@ -8,6 +8,23 @@ line. See the [usage][] page for instructions on specifying additional configs.
88The default configuration module is ` java2python.config.default ` . Refer to [ the source
99of that module] [ 1 ] for its values and additional descriptions.
1010
11+ ### Usage
12+
13+ To change the behavior of some or all of the config items, create a Python
14+ file, define the items you want, and specify that file when invoking ` j2py ` .
15+
16+ For example, if you would like to change the comment prefix to ` ## ` , you might
17+ do this:
18+
19+ $ echo "indentPrefix = '##'" >> myconfig.py
20+
21+ Then run the script:
22+
23+ $ j2py SomeJavaSource.java -c myconfig.py
24+
25+ The config files are Python modules, so you can use the full power of Python
26+ when writing your configurations.
27+
1128### A Note About Some of the Names: Prologue, Base, Head, and Epilogue
1229
1330When a config point has ` Prologue ` in its name, it means that the item will be
@@ -31,38 +48,40 @@ be responsible for generating code after the body of the item. The only
3148recognized epilogue config point is ` moduleEpilogueHandlers ` , which generates a
3249main script stanza if necessary.
3350
51+
52+
3453### Customization Points
3554
36- * indentPrefix
37- * commentPrefix
38- * expressionVariableNamingHandler
55+ #### < a name = " indentPrefix " ></ a > indentPrefix
56+ #### < a name = " commentPrefix " ></ a > commentPrefix
57+ #### < a name = " expressionVariableNamingHandler " ></ a > expressionVariableNamingHandler
3958
40- * modulePrologueHandlers
41- * moduleEpilogueHandlers
42- * moduleOutputHandlers
43- * modulePackageDeclarationHandler
44- * moduleImportDeclarationHandler
45- * moduleOutputSubs
59+ #### < a name = " modulePrologueHandlers " ></ a > modulePrologueHandlers
60+ #### < a name = " moduleEpilogueHandlers " ></ a > moduleEpilogueHandlers
61+ #### < a name = " moduleOutputHandlers " ></ a > moduleOutputHandlers
62+ #### < a name = " modulePackageDeclarationHandler " ></ a > modulePackageDeclarationHandler
63+ #### < a name = " moduleImportDeclarationHandler " ></ a > moduleImportDeclarationHandler
64+ #### < a name = " moduleOutputSubs " ></ a > moduleOutputSubs
4665
4766
48- * classHeadHandlers
49- * classBaseHandlers
50- * classPostWalkHandlers
67+ #### < a name = " classHeadHandlers " ></ a > classHeadHandlers
68+ #### < a name = " classBaseHandlers " ></ a > classBaseHandlers
69+ #### < a name = " classPostWalkHandlers " ></ a > classPostWalkHandlers
5170
52- * interfaceBaseHandlers
53- * interfaceHeadHandlers
71+ #### < a name = " interfaceBaseHandlers " ></ a > interfaceBaseHandlers
72+ #### < a name = " interfaceHeadHandlers " ></ a > interfaceHeadHandlers
5473
55- * enumHeadHandlers
56- * enumValueHandler
74+ #### < a name = " enumHeadHandlers " ></ a > enumHeadHandlers
75+ #### < a name = " enumValueHandler " ></ a > enumValueHandler
5776
5877
59- * methodParamHandlers
60- * methodLockFunctionName
61- * methodHeadHandlers
62- * methodPrologueHandlers
78+ #### < a name = " methodParamHandlers " ></ a > methodParamHandlers
79+ #### < a name = " methodLockFunctionName " ></ a > methodLockFunctionName
80+ #### < a name = " methodHeadHandlers " ></ a > methodHeadHandlers
81+ #### < a name = " methodPrologueHandlers " ></ a > methodPrologueHandlers
6382
64- * astTransforms
65- * typeSubs
83+ #### < a name = " astTransforms " ></ a > astTransforms
84+ #### < a name = " typeSubs " ></ a > typeSubs
6685
6786
6887[ usage ] : https://github.com/natural/java2python/tree/master/doc/usage.md
0 commit comments