home *** CD-ROM | disk | FTP | other *** search
/ PC World 1997 November / PCWorld_1997-11_cd.bin / software / programy / komix / DATA.Z / javatarget.tcl < prev    next >
Text File  |  1997-06-06  |  41KB  |  1,580 lines

  1. #---------------------------------------------------------------------------
  2. #
  3. # Copyright (c) 1997 by Cayenne Software, Inc.
  4. #
  5. # This software is furnished under a license and may be used only in
  6. # accordance with the terms of such license and with the inclusion of
  7. # the above copyright notice. This software or any other copies thereof
  8. # may not be provided or otherwise made available to any other person.
  9. # No title to and ownership of the software is hereby transferred.
  10. #
  11. # The information in this software is subject to change without notice
  12. # and should not be construed as a commitment by Cayenne Software, Inc.
  13. #
  14. #---------------------------------------------------------------------------
  15. #
  16. #       File            : javatarget.tcl
  17. #       Author          : 
  18. #       Original date   : May 1997
  19. #       Description     : Classes for code generation
  20. #
  21. #---------------------------------------------------------------------------
  22.  
  23. #---------------------------------------------------------------------------
  24. #      File:           @(#)javaaccess.tcl    /main/hindenburg/2
  25. #---------------------------------------------------------------------------
  26.  
  27. # Start user added include file section
  28. # End user added include file section
  29.  
  30.  
  31. Class JavaAccess : {GCObject} {
  32.     constructor
  33.     method destructor
  34.     method generate
  35.     attribute accessor
  36. }
  37.  
  38. constructor JavaAccess {class this i_accessor} {
  39.     set this [GCObject::constructor $class $this]
  40.     $this accessor $i_accessor
  41.     # Start constructor user section
  42.     # End constructor user section
  43.     return $this
  44. }
  45.  
  46. method JavaAccess::destructor {this} {
  47.     # Start destructor user section
  48.     # End destructor user section
  49. }
  50.  
  51. method JavaAccess::generate {this sect} {
  52.     $sect append "[$this accessor] "
  53. }
  54.  
  55. # Do not delete this line -- regeneration end marker
  56.  
  57. #---------------------------------------------------------------------------
  58. #      File:           @(#)javacommen.tcl    /main/hindenburg/2
  59. #---------------------------------------------------------------------------
  60.  
  61. # Start user added include file section
  62. # End user added include file section
  63.  
  64.  
  65. Class JavaComment : {GCObject} {
  66.     constructor
  67.     method destructor
  68.     method generate
  69.     attribute comment
  70. }
  71.  
  72. constructor JavaComment {class this comment} {
  73.     set this [GCObject::constructor $class $this]
  74.     $this comment $comment
  75.     # Start constructor user section
  76.     # End constructor user section
  77.     return $this
  78. }
  79.  
  80. method JavaComment::destructor {this} {
  81.     # Start destructor user section
  82.     # End destructor user section
  83. }
  84.  
  85. method JavaComment::generate {this sect} {
  86.     # !! Implement this function !!
  87. }
  88.  
  89. # Do not delete this line -- regeneration end marker
  90.  
  91. #---------------------------------------------------------------------------
  92. #      File:           @(#)javacompil.tcl    /main/hindenburg/4
  93. #---------------------------------------------------------------------------
  94.  
  95. # Start user added include file section
  96. # End user added include file section
  97.  
  98.  
  99. Class JavaCompilationUnit : {GCObject} {
  100.     constructor
  101.     method destructor
  102.     method generate
  103.     method needsType
  104.     method addImportOnDemand
  105.     method removeImportOnDemand
  106.     method addImportPackage
  107.     method removeImportPackage
  108.     method addImportType
  109.     method removeImportType
  110.     method addContainer
  111.     method removeContainer
  112.     attribute name
  113.     attribute importOnDemandSet
  114.     attribute importPackageSet
  115.     attribute importTypeSet
  116.     attribute packageStatement
  117.     attribute masterContainer
  118.     attribute containerSet
  119. }
  120.  
  121. constructor JavaCompilationUnit {class this i_name} {
  122.     set this [GCObject::constructor $class $this]
  123.     $this name $i_name
  124.     $this importOnDemandSet [List new]
  125.     $this importPackageSet [List new]
  126.     $this importTypeSet [List new]
  127.     $this containerSet [List new]
  128.     # Start constructor user section
  129.     # End constructor user section
  130.     return $this
  131. }
  132.  
  133. method JavaCompilationUnit::destructor {this} {
  134.     # Start destructor user section
  135.     # End destructor user section
  136. }
  137.  
  138. method JavaCompilationUnit::generate {this} {
  139.     if [$this needsType "Hashtable"] {
  140.         $this addImportType [JavaPackageName new "java.util.Hashtable"]
  141.     }
  142.  
  143.     if [$this needsType "Vector"] {
  144.         $this addImportType [JavaPackageName new "java.util.Vector"]
  145.     }
  146.  
  147.     set sect [TextSection new]
  148.  
  149.     if {[$this packageStatement] != ""} {
  150.         $sect append "package "
  151.         [$this packageStatement] generate $sect
  152.         $sect append ";\n\n"
  153.     }
  154.  
  155.     [$this importPackageSet] foreach package {
  156.         $sect append "import "
  157.         $package generate $sect
  158.         $sect append ";\n"
  159.     }
  160.  
  161.     [$this importTypeSet] foreach package {
  162.         $sect append "import "
  163.         $package generate $sect
  164.         $sect append ";\n"
  165.     }
  166.  
  167.     [$this importOnDemandSet] foreach package {
  168.         $sect append "import "
  169.         $package generate $sect
  170.         $sect append ".*;\n"
  171.     }
  172.  
  173.     $sect append "\n${JavaCookie::startClassDeclaration}\n\n"
  174.  
  175.     if {[$this masterContainer] != ""} {
  176.         [$this masterContainer] generate $sect
  177.     }
  178.  
  179.     [$this containerSet] foreach container {
  180.         if {[$this masterContainer] != $container} {
  181.         $container generate $sect
  182.         }
  183.     }
  184.  
  185.     $sect append "\n${JavaCookie::endClassDeclaration}\n"
  186.  
  187.     return $sect
  188. }
  189.  
  190. method JavaCompilationUnit::needsType {this typeName} {
  191.     [$this containerSet] foreach container {
  192.         if [$container needsType $typeName] {
  193.         return 1
  194.         }
  195.     }
  196.  
  197.     return 0
  198. }
  199.  
  200. # Do not delete this line -- regeneration end marker
  201.  
  202. method JavaCompilationUnit::addImportOnDemand {this newImportOnDemand} {
  203.     [$this importOnDemandSet] append $newImportOnDemand
  204.  
  205. }
  206.  
  207. method JavaCompilationUnit::removeImportOnDemand {this oldImportOnDemand} {
  208.     [$this importOnDemandSet] removeValue $oldImportOnDemand
  209. }
  210.  
  211. method JavaCompilationUnit::addImportPackage {this newImportPackage} {
  212.     [$this importPackageSet] append $newImportPackage
  213.  
  214. }
  215.  
  216. method JavaCompilationUnit::removeImportPackage {this oldImportPackage} {
  217.     [$this importPackageSet] removeValue $oldImportPackage
  218. }
  219.  
  220. method JavaCompilationUnit::addImportType {this newImportType} {
  221.     [$this importTypeSet] append $newImportType
  222.  
  223. }
  224.  
  225. method JavaCompilationUnit::removeImportType {this oldImportType} {
  226.     [$this importTypeSet] removeValue $oldImportType
  227. }
  228.  
  229. method JavaCompilationUnit::addContainer {this newContainer} {
  230.     [$this containerSet] append $newContainer
  231.  
  232. }
  233.  
  234. method JavaCompilationUnit::removeContainer {this oldContainer} {
  235.     [$this containerSet] removeValue $oldContainer
  236. }
  237.  
  238. #---------------------------------------------------------------------------
  239. #      File:           @(#)javacontai.tcl    /main/hindenburg/6
  240. #---------------------------------------------------------------------------
  241.  
  242. # Start user added include file section
  243. # End user added include file section
  244.  
  245.  
  246. Class JavaContainer : {GCObject} {
  247.     constructor
  248.     method destructor
  249.     method generate
  250.     method generateInterfaceList
  251.     method needsType
  252.     method addMethod
  253.     method removeMethod
  254.     method addVariable
  255.     method removeVariable
  256.     method addInterface
  257.     method removeInterface
  258.     attribute name
  259.     attribute needsHashtable
  260.     attribute needsVector
  261.     attribute comment
  262.     attribute methodSet
  263.     attribute access
  264.     attribute modifier
  265.     attribute variableSet
  266.     attribute interfaceSet
  267.     attribute ooplClass
  268. }
  269.  
  270. constructor JavaContainer {class this ooplClass} {
  271.     set this [GCObject::constructor $class $this]
  272.     $this needsHashtable 0
  273.     $this needsVector 0
  274.     $this ooplClass $ooplClass
  275.     $this methodSet [List new]
  276.     $this variableSet [List new]
  277.     $this interfaceSet [List new]
  278.     # Start constructor user section
  279.  
  280.     $this name [$ooplClass getName]
  281.  
  282.     # End constructor user section
  283.     return $this
  284. }
  285.  
  286. method JavaContainer::destructor {this} {
  287.     # Start destructor user section
  288.     # End destructor user section
  289. }
  290.  
  291. method JavaContainer::generate {this sect} {
  292.     # !! Implement this function !!
  293. }
  294.  
  295. method JavaContainer::generateInterfaceList {this keyword} {
  296.     set sect [TextSection new]
  297.     set first 1
  298.  
  299.         [$this interfaceSet] foreach interface {
  300.             if {$first} {
  301.                 $sect append " $keyword $interface"
  302.                 incr first -1
  303.             } else {
  304.                 $sect append ", $interface"
  305.             }
  306.         }
  307.  
  308.     return $sect
  309. }
  310.  
  311. method JavaContainer::needsType {this typeName} {
  312.     return 0
  313. }
  314.  
  315. # Do not delete this line -- regeneration end marker
  316.  
  317. method JavaContainer::addMethod {this newMethod} {
  318.     [$this methodSet] append $newMethod
  319.  
  320. }
  321.  
  322. method JavaContainer::removeMethod {this oldMethod} {
  323.     [$this methodSet] removeValue $oldMethod
  324. }
  325.  
  326. method JavaContainer::addVariable {this newVariable} {
  327.     [$this variableSet] append $newVariable
  328.  
  329. }
  330.  
  331. method JavaContainer::removeVariable {this oldVariable} {
  332.     [$this variableSet] removeValue $oldVariable
  333. }
  334.  
  335. method JavaContainer::addInterface {this newInterface} {
  336.     [$this interfaceSet] append $newInterface
  337.  
  338. }
  339.  
  340. method JavaContainer::removeInterface {this oldInterface} {
  341.     [$this interfaceSet] removeValue $oldInterface
  342. }
  343.  
  344. #---------------------------------------------------------------------------
  345. #      File:           @(#)javacookie.tcl    /main/hindenburg/6
  346. #---------------------------------------------------------------------------
  347.  
  348. # Start user added include file section
  349. # End user added include file section
  350.  
  351.  
  352. Class JavaCookie : {GCObject} {
  353.     constructor
  354.     method destructor
  355. }
  356.  
  357. global JavaCookie::dataAttributeSection
  358. set JavaCookie::dataAttributeSection "// Data attributes"
  359.  
  360. global JavaCookie::associationAttributeSection
  361. set JavaCookie::associationAttributeSection "// Association attributes"
  362.  
  363. global JavaCookie::defaultConstructorSection
  364. set JavaCookie::defaultConstructorSection "// Default constructor"
  365.  
  366. global JavaCookie::userConstructorSection
  367. set JavaCookie::userConstructorSection "// User defined constructors"
  368.  
  369. global JavaCookie::methodSection
  370. set JavaCookie::methodSection "// Methods"
  371.  
  372. global JavaCookie::attributeAccessorSection
  373. set JavaCookie::attributeAccessorSection "// Attribute accessors"
  374.  
  375. global JavaCookie::associationAccessorSection
  376. set JavaCookie::associationAccessorSection "// Association accessors"
  377.  
  378. global JavaCookie::startClassDeclaration
  379. set JavaCookie::startClassDeclaration "// Do not delete this line -- Start Class Declarations"
  380.  
  381. global JavaCookie::regenerationEndSection
  382. set JavaCookie::regenerationEndSection "// Do not delete this line -- regeneration end marker"
  383.  
  384. global JavaCookie::endClassDeclaration
  385. set JavaCookie::endClassDeclaration "// Do not delete this line -- End Class Declarations"
  386.  
  387. global JavaCookie::startUserSection
  388. set JavaCookie::startUserSection "// Start user code section"
  389.  
  390. global JavaCookie::endUserSection
  391. set JavaCookie::endUserSection "// End user code section"
  392.  
  393. global JavaCookie::startObsoleteCodeSection
  394. set JavaCookie::startObsoleteCodeSection "// Start obsolete code section -- Remove this line"
  395.  
  396. global JavaCookie::endObsoleteCodeSection
  397. set JavaCookie::endObsoleteCodeSection "// End obsolete code section -- Remove this line"
  398.  
  399. global JavaCookie::endMarker
  400. set JavaCookie::endMarker "-- regeneration end marker"
  401.  
  402.  
  403. constructor JavaCookie {class this} {
  404.     set this [GCObject::constructor $class $this]
  405.     # Start constructor user section
  406.     # End constructor user section
  407.     return $this
  408. }
  409.  
  410. method JavaCookie::destructor {this} {
  411.     # Start destructor user section
  412.     # End destructor user section
  413. }
  414.  
  415. # Do not delete this line -- regeneration end marker
  416.  
  417. #---------------------------------------------------------------------------
  418. #      File:           @(#)javafeatur.tcl    /main/hindenburg/2
  419. #---------------------------------------------------------------------------
  420.  
  421. # Start user added include file section
  422. # End user added include file section
  423.  
  424.  
  425. Class JavaFeature : {GCObject} {
  426.     constructor
  427.     method destructor
  428.     method generate
  429.     method addModifier
  430.     method removeModifier
  431.     attribute name
  432.     attribute comment
  433.     attribute type
  434.     attribute modifierSet
  435.     attribute access
  436. }
  437.  
  438. constructor JavaFeature {class this i_name} {
  439.     set this [GCObject::constructor $class $this]
  440.     $this name $i_name
  441.     $this modifierSet [List new]
  442.     # Start constructor user section
  443.     # End constructor user section
  444.     return $this
  445. }
  446.  
  447. method JavaFeature::destructor {this} {
  448.     # Start destructor user section
  449.     # End destructor user section
  450. }
  451.  
  452. method JavaFeature::generate {this sect} {
  453.     # !! Implement this function !!
  454. }
  455.  
  456. # Do not delete this line -- regeneration end marker
  457.  
  458. method JavaFeature::addModifier {this newModifier} {
  459.     [$this modifierSet] append $newModifier
  460.  
  461. }
  462.  
  463. method JavaFeature::removeModifier {this oldModifier} {
  464.     [$this modifierSet] removeValue $oldModifier
  465. }
  466.  
  467. #---------------------------------------------------------------------------
  468. #      File:           @(#)javainitia.tcl    /main/hindenburg/2
  469. #---------------------------------------------------------------------------
  470.  
  471. # Start user added include file section
  472. # End user added include file section
  473.  
  474.  
  475. Class JavaInitializer : {GCObject} {
  476.     constructor
  477.     method destructor
  478.     method generate
  479.     attribute value
  480. }
  481.  
  482. constructor JavaInitializer {class this i_value} {
  483.     set this [GCObject::constructor $class $this]
  484.     $this value $i_value
  485.     # Start constructor user section
  486.     # End constructor user section
  487.     return $this
  488. }
  489.  
  490. method JavaInitializer::destructor {this} {
  491.     # Start destructor user section
  492.     # End destructor user section
  493. }
  494.  
  495. method JavaInitializer::generate {this sect} {
  496.     $sect append " = [$this value]"
  497. }
  498.  
  499. # Do not delete this line -- regeneration end marker
  500.  
  501. #---------------------------------------------------------------------------
  502. #      File:           @(#)javamodel.tcl    /main/hindenburg/2
  503. #---------------------------------------------------------------------------
  504.  
  505. # Start user added include file section
  506. # End user added include file section
  507.  
  508.  
  509. Class JavaModel : {GCObject} {
  510.     constructor
  511.     method destructor
  512.     method generate
  513.     method getCompilationUnit
  514.     method addUnit
  515.     method removeUnit
  516.     attribute unitSet
  517. }
  518.  
  519. constructor JavaModel {class this} {
  520.     set this [GCObject::constructor $class $this]
  521.     $this unitSet [List new]
  522.     # Start constructor user section
  523.     # End constructor user section
  524.     return $this
  525. }
  526.  
  527. method JavaModel::destructor {this} {
  528.     # Start destructor user section
  529.     # End destructor user section
  530. }
  531.  
  532. method JavaModel::generate {this typeToClassDict} {
  533.     [$this unitSet] foreach unit {
  534.         if {[$unit masterContainer] != ""} {
  535.         set sectionDict [Dictionary new]
  536.         $sectionDict set "java" [$unit generate]
  537.         set ooplClass [[$unit masterContainer] ooplClass]
  538.         $typeToClassDict set $ooplClass $sectionDict
  539.         }
  540.     }
  541. }
  542.  
  543. method JavaModel::getCompilationUnit {this unitName} {
  544.     [$this unitSet] foreach unit {
  545.         if {[$unit name] == $unitName} {
  546.         return $unit
  547.         }
  548.     }
  549.  
  550.     set unit [JavaCompilationUnit new $unitName]
  551.  
  552.     $this addUnit $unit
  553.  
  554.     return $unit
  555. }
  556.  
  557. # Do not delete this line -- regeneration end marker
  558.  
  559. method JavaModel::addUnit {this newUnit} {
  560.     [$this unitSet] append $newUnit
  561.  
  562. }
  563.  
  564. method JavaModel::removeUnit {this oldUnit} {
  565.     [$this unitSet] removeValue $oldUnit
  566. }
  567.  
  568. #---------------------------------------------------------------------------
  569. #      File:           @(#)javamodifi.tcl    /main/hindenburg/2
  570. #---------------------------------------------------------------------------
  571.  
  572. # Start user added include file section
  573. # End user added include file section
  574.  
  575.  
  576. Class JavaModifier : {GCObject} {
  577.     constructor
  578.     method destructor
  579.     method generate
  580.     attribute modifier
  581. }
  582.  
  583. constructor JavaModifier {class this i_modifier} {
  584.     set this [GCObject::constructor $class $this]
  585.     $this modifier $i_modifier
  586.     # Start constructor user section
  587.     # End constructor user section
  588.     return $this
  589. }
  590.  
  591. method JavaModifier::destructor {this} {
  592.     # Start destructor user section
  593.     # End destructor user section
  594. }
  595.  
  596. method JavaModifier::generate {this sect} {
  597.     $sect append "[$this modifier] "
  598. }
  599.  
  600. # Do not delete this line -- regeneration end marker
  601.  
  602. #---------------------------------------------------------------------------
  603. #      File:           @(#)javapackag.tcl    /main/hindenburg/3
  604. #---------------------------------------------------------------------------
  605.  
  606. # Start user added include file section
  607. # End user added include file section
  608.  
  609.  
  610. Class JavaPackageName : {GCObject} {
  611.     constructor
  612.     method destructor
  613.     method generate
  614.     attribute identifier
  615. }
  616.  
  617. constructor JavaPackageName {class this i_identifier} {
  618.     set this [GCObject::constructor $class $this]
  619.     $this identifier $i_identifier
  620.     # Start constructor user section
  621.  
  622.     $this identifier [string trim $i_identifier]
  623.  
  624.     # End constructor user section
  625.     return $this
  626. }
  627.  
  628. method JavaPackageName::destructor {this} {
  629.     # Start destructor user section
  630.     # End destructor user section
  631. }
  632.  
  633. method JavaPackageName::generate {this sect} {
  634.     $sect append [$this identifier]
  635. }
  636.  
  637. # Do not delete this line -- regeneration end marker
  638.  
  639. #---------------------------------------------------------------------------
  640. #      File:           @(#)javaparame.tcl    /main/hindenburg/2
  641. #---------------------------------------------------------------------------
  642.  
  643. # Start user added include file section
  644. # End user added include file section
  645.  
  646.  
  647. Class JavaParameter : {GCObject} {
  648.     constructor
  649.     method destructor
  650.     method generate
  651.     attribute name
  652.     attribute type
  653. }
  654.  
  655. constructor JavaParameter {class this i_name type} {
  656.     set this [GCObject::constructor $class $this]
  657.     $this name $i_name
  658.     $this type $type
  659.     # Start constructor user section
  660.     # End constructor user section
  661.     return $this
  662. }
  663.  
  664. method JavaParameter::destructor {this} {
  665.     # Start destructor user section
  666.     # End destructor user section
  667. }
  668.  
  669. method JavaParameter::generate {this sect} {
  670.     [$this type] generate $sect
  671.     $sect append [$this name]
  672. }
  673.  
  674. # Do not delete this line -- regeneration end marker
  675.  
  676. #---------------------------------------------------------------------------
  677. #      File:           @(#)javatype.tcl    /main/hindenburg/2
  678. #---------------------------------------------------------------------------
  679.  
  680. # Start user added include file section
  681. # End user added include file section
  682.  
  683.  
  684. Class JavaType : {GCObject} {
  685.     constructor
  686.     method destructor
  687.     method generate
  688.     attribute name
  689. }
  690.  
  691. constructor JavaType {class this i_name} {
  692.     set this [GCObject::constructor $class $this]
  693.     $this name $i_name
  694.     # Start constructor user section
  695.     # End constructor user section
  696.     return $this
  697. }
  698.  
  699. method JavaType::destructor {this} {
  700.     # Start destructor user section
  701.     # End destructor user section
  702. }
  703.  
  704. method JavaType::generate {this sect} {
  705.     $sect append "[$this name] "
  706. }
  707.  
  708. # Do not delete this line -- regeneration end marker
  709.  
  710. #---------------------------------------------------------------------------
  711. #      File:           @(#)javamethod.tcl    /main/hindenburg/2
  712. #---------------------------------------------------------------------------
  713.  
  714. # Start user added include file section
  715. # End user added include file section
  716.  
  717.  
  718. Class JavaMethod : {JavaFeature} {
  719.     constructor
  720.     method destructor
  721.     method generate
  722.     method generateParameterList
  723.     method addParameter
  724.     method removeParameter
  725.     attribute userBody
  726.     attribute parameterSet
  727. }
  728.  
  729. constructor JavaMethod {class this i_name} {
  730.     set this [JavaFeature::constructor $class $this $i_name]
  731.     $this parameterSet [List new]
  732.     # Start constructor user section
  733.     # End constructor user section
  734.     return $this
  735. }
  736.  
  737. method JavaMethod::destructor {this} {
  738.     # Start destructor user section
  739.     # End destructor user section
  740.     $this JavaFeature::destructor
  741. }
  742.  
  743. method JavaMethod::generate {this sect} {
  744.     # !! Implement this function !!
  745. }
  746.  
  747. method JavaMethod::generateParameterList {this} {
  748.     set sect [TextSection new]
  749.  
  750.     $sect append "("
  751.     set first 1
  752.  
  753.     [$this parameterSet] foreach parameter {
  754.         if {$first} {
  755.         incr first -1
  756.         } else {
  757.         $sect append ", "
  758.         }
  759.  
  760.         $parameter generate $sect
  761.     }
  762.  
  763.     $sect append ")"
  764.  
  765.     return $sect
  766. }
  767.  
  768. # Do not delete this line -- regeneration end marker
  769.  
  770. method JavaMethod::addParameter {this newParameter} {
  771.     [$this parameterSet] append $newParameter
  772.  
  773. }
  774.  
  775. method JavaMethod::removeParameter {this oldParameter} {
  776.     [$this parameterSet] removeValue $oldParameter
  777. }
  778.  
  779. #---------------------------------------------------------------------------
  780. #      File:           @(#)javathrowe.tcl    /main/hindenburg/3
  781. #---------------------------------------------------------------------------
  782.  
  783. # Start user added include file section
  784. # End user added include file section
  785.  
  786.  
  787. Class JavaThrower : {JavaMethod} {
  788.     constructor
  789.     method destructor
  790.     method generateThrowList
  791.     method addThrow
  792.     method removeThrow
  793.     attribute throwSet
  794. }
  795.  
  796. constructor JavaThrower {class this i_name} {
  797.     set this [JavaMethod::constructor $class $this $i_name]
  798.     $this throwSet [List new]
  799.     # Start constructor user section
  800.     # End constructor user section
  801.     return $this
  802. }
  803.  
  804. method JavaThrower::destructor {this} {
  805.     # Start destructor user section
  806.     # End destructor user section
  807.     $this JavaMethod::destructor
  808. }
  809.  
  810. method JavaThrower::generateThrowList {this} {
  811.     set sect [TextSection new]
  812.  
  813.     if {![[$this throwSet] empty]} {
  814.         set first 1
  815.  
  816.         [$this throwSet] foreach throw {
  817.         if {$first} {
  818.             $sect append " throws "
  819.             incr first -1
  820.         } else {
  821.             $sect append ", "
  822.         }
  823.  
  824.         $throw generate $sect
  825.         }
  826.     }
  827.  
  828.     return $sect
  829. }
  830.  
  831. # Do not delete this line -- regeneration end marker
  832.  
  833. method JavaThrower::addThrow {this newThrow} {
  834.     [$this throwSet] append $newThrow
  835.  
  836. }
  837.  
  838. method JavaThrower::removeThrow {this oldThrow} {
  839.     [$this throwSet] removeValue $oldThrow
  840. }
  841.  
  842. #---------------------------------------------------------------------------
  843. #      File:           @(#)javavariab.tcl    /main/hindenburg/3
  844. #---------------------------------------------------------------------------
  845.  
  846. # Start user added include file section
  847. # End user added include file section
  848.  
  849.  
  850. Class JavaVariable : {JavaFeature} {
  851.     constructor
  852.     method destructor
  853.     method generate
  854.     attribute initializer
  855. }
  856.  
  857. constructor JavaVariable {class this i_name} {
  858.     set this [JavaFeature::constructor $class $this $i_name]
  859.     # Start constructor user section
  860.     # End constructor user section
  861.     return $this
  862. }
  863.  
  864. method JavaVariable::destructor {this} {
  865.     # Start destructor user section
  866.     # End destructor user section
  867.     $this JavaFeature::destructor
  868. }
  869.  
  870. method JavaVariable::generate {this sect} {
  871.     if {[$this comment] != ""} {
  872.         [$this comment] generate $sect
  873.     }
  874.  
  875.     if {[$this access] != ""} {
  876.         [$this access] generate $sect
  877.     }
  878.  
  879.     [$this modifierSet] foreach modifier {
  880.         $modifier generate $sect
  881.     }
  882.  
  883.     [$this type] generate $sect
  884.  
  885.     $sect append [$this name]
  886.  
  887.     if {[$this initializer] != ""} {
  888.         [$this initializer] generate $sect
  889.     }
  890.  
  891.     $sect append ";\n"
  892. }
  893.  
  894. # Do not delete this line -- regeneration end marker
  895.  
  896. #---------------------------------------------------------------------------
  897. #      File:           @(#)javaconstr.tcl    /main/hindenburg/5
  898. #---------------------------------------------------------------------------
  899.  
  900. # Start user added include file section
  901. # End user added include file section
  902.  
  903.  
  904. Class JavaConstructor : {JavaMethod} {
  905.     constructor
  906.     method destructor
  907.     method generate
  908.     attribute generatorBody
  909. }
  910.  
  911. constructor JavaConstructor {class this i_name} {
  912.     set this [JavaMethod::constructor $class $this $i_name]
  913.     # Start constructor user section
  914.     # End constructor user section
  915.     return $this
  916. }
  917.  
  918. method JavaConstructor::destructor {this} {
  919.     # Start destructor user section
  920.     # End destructor user section
  921.     $this JavaMethod::destructor
  922. }
  923.  
  924. method JavaConstructor::generate {this sect} {
  925.     if {[$this comment] != ""} {
  926.         [$this comment] generate $sect
  927.     }
  928.  
  929.     if {[$this access] != ""} {
  930.         [$this access] generate $sect
  931.     }
  932.  
  933.     $sect append [$this name]
  934.     $sect appendSect [$this generateParameterList]
  935.     $sect append " {\n"
  936.     $sect indent +
  937.     $sect appendSect [$this generatorBody]
  938.     $sect append "\n${JavaCookie::startUserSection}\n"
  939.  
  940.     if {[$this userBody] != ""} {
  941.         set oldIndent [$sect indent]
  942.  
  943.         $sect indent 0
  944.         $sect appendSect [$this userBody]
  945.         $sect indent $oldIndent
  946.     }
  947.  
  948.     $sect append "${JavaCookie::endUserSection}\n"
  949.     $sect indent -
  950.     $sect append "} // default constructor [$this name]\n\n"
  951. }
  952.  
  953. # Do not delete this line -- regeneration end marker
  954.  
  955. #---------------------------------------------------------------------------
  956. #      File:           @(#)javauserme.tcl    /main/hindenburg/4
  957. #---------------------------------------------------------------------------
  958.  
  959. # Start user added include file section
  960. # End user added include file section
  961.  
  962.  
  963. Class JavaUserMethod : {JavaThrower} {
  964.     constructor
  965.     method destructor
  966.     method generate
  967.     attribute hasBody
  968.     attribute userBody
  969. }
  970.  
  971. constructor JavaUserMethod {class this i_name} {
  972.     set this [JavaThrower::constructor $class $this $i_name]
  973.     # Start constructor user section
  974.  
  975.     $this hasBody 1
  976.  
  977.     # End constructor user section
  978.     return $this
  979. }
  980.  
  981. method JavaUserMethod::destructor {this} {
  982.     # Start destructor user section
  983.     # End destructor user section
  984.     $this JavaThrower::destructor
  985. }
  986.  
  987. method JavaUserMethod::generate {this sect} {
  988.     if {[$this comment] != ""} {
  989.         [$this comment] generate $sect
  990.     }
  991.  
  992.     if {[$this access] != ""} {
  993.         [$this access] generate $sect
  994.     }
  995.  
  996.     [$this modifierSet] foreach modifier {
  997.         $modifier generate $sect
  998.     }
  999.  
  1000.     if {[$this type] != ""} {
  1001.         [$this type] generate $sect
  1002.     }
  1003.  
  1004.     $sect append [$this name]
  1005.  
  1006.     $sect appendSect [$this generateParameterList]
  1007.     $sect appendSect [$this generateThrowList]
  1008.  
  1009.     if [$this hasBody] {
  1010.         $sect append " {\n"
  1011.  
  1012.         if {[$this userBody] != ""} {
  1013.         set oldIndent [$sect indent]
  1014.  
  1015.         $sect indent 0
  1016.         $sect appendSect [$this userBody]
  1017.         $sect indent $oldIndent
  1018.         }
  1019.  
  1020.         $sect append "} // method [$this name] ${JavaCookie::endMarker}\n\n"
  1021.     } else {
  1022.         $sect append ";\n\n"
  1023.     }
  1024. }
  1025.  
  1026. # Do not delete this line -- regeneration end marker
  1027.  
  1028. #---------------------------------------------------------------------------
  1029. #      File:           @(#)javastatic.tcl    /main/hindenburg/4
  1030. #---------------------------------------------------------------------------
  1031.  
  1032. # Start user added include file section
  1033. # End user added include file section
  1034.  
  1035.  
  1036. Class JavaStaticInitializer : {JavaMethod} {
  1037.     constructor
  1038.     method destructor
  1039.     method generate
  1040.     method generateParameterList
  1041. }
  1042.  
  1043. constructor JavaStaticInitializer {class this i_name} {
  1044.     set this [JavaMethod::constructor $class $this $i_name]
  1045.     # Start constructor user section
  1046.     # End constructor user section
  1047.     return $this
  1048. }
  1049.  
  1050. method JavaStaticInitializer::destructor {this} {
  1051.     # Start destructor user section
  1052.     # End destructor user section
  1053.     $this JavaMethod::destructor
  1054. }
  1055.  
  1056. method JavaStaticInitializer::generate {this sect} {
  1057.     if {[$this comment] != ""} {
  1058.         [$this comment] generate $sect
  1059.     }
  1060.  
  1061.     $sect append "static {\n"
  1062.  
  1063.     if {[$this userBody] != ""} {
  1064.         set oldIndent [$sect indent]
  1065.  
  1066.         $sect indent 0
  1067.         $sect appendSect [$this userBody]
  1068.         $sect indent $oldIndent
  1069.     }
  1070.  
  1071.     $sect append "} // static initializer ${JavaCookie::endMarker}\n\n"
  1072. }
  1073.  
  1074. method JavaStaticInitializer::generateParameterList {this} {
  1075.     return [TextSection new]
  1076. }
  1077.  
  1078. # Do not delete this line -- regeneration end marker
  1079.  
  1080. #---------------------------------------------------------------------------
  1081. #      File:           @(#)javaaccmet.tcl    /main/hindenburg/3
  1082. #---------------------------------------------------------------------------
  1083.  
  1084. # Start user added include file section
  1085. # End user added include file section
  1086.  
  1087.  
  1088. Class JavaAccMethod : {JavaMethod} {
  1089.     constructor
  1090.     method destructor
  1091.     method generate
  1092.     attribute generatorBody
  1093. }
  1094.  
  1095. constructor JavaAccMethod {class this i_name} {
  1096.     set this [JavaMethod::constructor $class $this $i_name]
  1097.     # Start constructor user section
  1098.     # End constructor user section
  1099.     return $this
  1100. }
  1101.  
  1102. method JavaAccMethod::destructor {this} {
  1103.     # Start destructor user section
  1104.     # End destructor user section
  1105.     $this JavaMethod::destructor
  1106. }
  1107.  
  1108. method JavaAccMethod::generate {this sect} {
  1109.     if {[$this access] != ""} {
  1110.         [$this access] generate $sect
  1111.     }
  1112.  
  1113.     [$this modifierSet] foreach modifier {
  1114.         $modifier generate $sect
  1115.     }
  1116.  
  1117.     if {[$this type] != ""} {
  1118.         [$this type] generate $sect
  1119.     }
  1120.  
  1121.     $sect append [$this name]
  1122.  
  1123.     $sect appendSect [$this generateParameterList]
  1124.  
  1125.     $sect append " {\n"
  1126.     $sect indent +
  1127.     $sect appendSect [$this generatorBody]
  1128.     $sect indent -
  1129.     $sect append "}\n\n"
  1130. }
  1131.  
  1132. # Do not delete this line -- regeneration end marker
  1133.  
  1134. #---------------------------------------------------------------------------
  1135. #      File:           @(#)javablockc.tcl    /main/hindenburg/2
  1136. #---------------------------------------------------------------------------
  1137.  
  1138. # Start user added include file section
  1139. # End user added include file section
  1140.  
  1141.  
  1142. Class JavaBlockComment : {JavaComment} {
  1143.     constructor
  1144.     method destructor
  1145.     method generate
  1146. }
  1147.  
  1148. constructor JavaBlockComment {class this comment} {
  1149.     set this [JavaComment::constructor $class $this $comment]
  1150.     # Start constructor user section
  1151.     # End constructor user section
  1152.     return $this
  1153. }
  1154.  
  1155. method JavaBlockComment::destructor {this} {
  1156.     # Start destructor user section
  1157.     # End destructor user section
  1158.     $this JavaComment::destructor
  1159. }
  1160.  
  1161. method JavaBlockComment::generate {this sect} {
  1162.     $sect append "/*\n"
  1163.     $sect append "[$this comment]\n"
  1164.     $sect append "*/\n"
  1165. }
  1166.  
  1167. # Do not delete this line -- regeneration end marker
  1168.  
  1169. #---------------------------------------------------------------------------
  1170. #      File:           @(#)javauserco.tcl    /main/hindenburg/5
  1171. #---------------------------------------------------------------------------
  1172.  
  1173. # Start user added include file section
  1174. # End user added include file section
  1175.  
  1176.  
  1177. Class JavaUserConstructor : {JavaThrower} {
  1178.     constructor
  1179.     method destructor
  1180.     method generate
  1181.     attribute userBody
  1182. }
  1183.  
  1184. constructor JavaUserConstructor {class this i_name} {
  1185.     set this [JavaThrower::constructor $class $this $i_name]
  1186.     # Start constructor user section
  1187.     # End constructor user section
  1188.     return $this
  1189. }
  1190.  
  1191. method JavaUserConstructor::destructor {this} {
  1192.     # Start destructor user section
  1193.     # End destructor user section
  1194.     $this JavaThrower::destructor
  1195. }
  1196.  
  1197. method JavaUserConstructor::generate {this sect} {
  1198.     if {[$this comment] != ""} {
  1199.         [$this comment] generate $sect
  1200.     }
  1201.  
  1202.     if {[$this access] != ""} {
  1203.         [$this access] generate $sect
  1204.     }
  1205.  
  1206.     $sect append [$this name]
  1207.  
  1208.     $sect appendSect [$this generateParameterList]
  1209.     $sect appendSect [$this generateThrowList]
  1210.  
  1211.     $sect append " {\n"
  1212.  
  1213.     if {[$this userBody] != ""} {
  1214.         set oldIndent [$sect indent]
  1215.  
  1216.         $sect indent 0
  1217.         $sect appendSect [$this userBody]
  1218.         $sect indent $oldIndent
  1219.     }
  1220.  
  1221.     $sect append "} // user constructor [$this name] ${JavaCookie::endMarker}\n\n"
  1222. }
  1223.  
  1224. # Do not delete this line -- regeneration end marker
  1225.  
  1226. #---------------------------------------------------------------------------
  1227. #      File:           @(#)javainterf.tcl    /main/hindenburg/4
  1228. #---------------------------------------------------------------------------
  1229.  
  1230. # Start user added include file section
  1231. # End user added include file section
  1232.  
  1233.  
  1234. Class JavaInterface : {JavaContainer} {
  1235.     constructor
  1236.     method destructor
  1237.     method generate
  1238. }
  1239.  
  1240. constructor JavaInterface {class this ooplClass} {
  1241.     set this [JavaContainer::constructor $class $this $ooplClass]
  1242.     # Start constructor user section
  1243.     # End constructor user section
  1244.     return $this
  1245. }
  1246.  
  1247. method JavaInterface::destructor {this} {
  1248.     # Start destructor user section
  1249.     # End destructor user section
  1250.     $this JavaContainer::destructor
  1251. }
  1252.  
  1253. method JavaInterface::generate {this sect} {
  1254.     if {[$this comment] != ""} {
  1255.         [$this comment] generate $sect
  1256.     }
  1257.  
  1258.     if {[$this access] != ""} {
  1259.         [$this access] generate $sect
  1260.     }
  1261.  
  1262.     if {[$this modifier] != ""} {
  1263.         [$this modifier] generate $sect
  1264.     }
  1265.  
  1266.     $sect append "interface [$this name]"
  1267.     $sect appendSect [$this generateInterfaceList "extends"]
  1268.     $sect append " {\n"
  1269.     $sect indent +
  1270.     $sect append "\n${JavaCookie::dataAttributeSection}\n\n"
  1271.  
  1272.     [$this variableSet] foreach variable {
  1273.         $variable generate $sect
  1274.     }
  1275.  
  1276.     $sect append "\n${JavaCookie::methodSection}\n\n"
  1277.  
  1278.     [$this methodSet] foreach method {
  1279.         $method generate $sect
  1280.     }
  1281.  
  1282.     $sect indent -
  1283.     $sect append "} // interface [$this name]\n\n"
  1284. }
  1285.  
  1286. # Do not delete this line -- regeneration end marker
  1287.  
  1288. #---------------------------------------------------------------------------
  1289. #      File:           @(#)javaclass.tcl    /main/hindenburg/8
  1290. #---------------------------------------------------------------------------
  1291.  
  1292. # Start user added include file section
  1293. # End user added include file section
  1294.  
  1295.  
  1296. Class JavaClass : {JavaContainer} {
  1297.     constructor
  1298.     method destructor
  1299.     method generate
  1300.     method needsType
  1301.     method addAttributeAccessor
  1302.     method removeAttributeAccessor
  1303.     method addAssociationAccessor
  1304.     method removeAssociationAccessor
  1305.     method addConstructor
  1306.     method removeConstructor
  1307.     method addUserConstructor
  1308.     method removeUserConstructor
  1309.     method addAssocVariable
  1310.     method removeAssocVariable
  1311.     attribute superClass
  1312.     attribute obsoleteCode
  1313.     attribute attributeAccessorSet
  1314.     attribute associationAccessorSet
  1315.     attribute constructorSet
  1316.     attribute userConstructorSet
  1317.     attribute defaultConstructor
  1318.     attribute assocVariableSet
  1319. }
  1320.  
  1321. constructor JavaClass {class this ooplClass} {
  1322.     set this [JavaContainer::constructor $class $this $ooplClass]
  1323.     $this attributeAccessorSet [List new]
  1324.     $this associationAccessorSet [List new]
  1325.     $this constructorSet [List new]
  1326.     $this userConstructorSet [List new]
  1327.     $this assocVariableSet [List new]
  1328.     # Start constructor user section
  1329.     # End constructor user section
  1330.     return $this
  1331. }
  1332.  
  1333. method JavaClass::destructor {this} {
  1334.     # Start destructor user section
  1335.     # End destructor user section
  1336.     $this JavaContainer::destructor
  1337. }
  1338.  
  1339. method JavaClass::generate {this sect} {
  1340.     if {[$this comment] != ""} {
  1341.         [$this comment] generate $sect
  1342.     }
  1343.  
  1344.     if {[$this access] != ""} {
  1345.         [$this access] generate $sect
  1346.     }
  1347.  
  1348.     if {[$this modifier] != ""} {
  1349.         [$this modifier] generate $sect
  1350.     }
  1351.  
  1352.     $sect append "class [$this name] extends "
  1353.  
  1354.     if {[$this superClass] == ""} {
  1355.         $sect append "Object"
  1356.     } else {
  1357.         $sect append [$this superClass]
  1358.     }
  1359.  
  1360.     $sect appendSect [$this generateInterfaceList "implements"]
  1361.  
  1362.     $sect append " {\n"
  1363.     $sect indent +
  1364.     $sect append "\n${JavaCookie::dataAttributeSection}\n\n"
  1365.  
  1366.     [$this variableSet] foreach variable {
  1367.         $variable generate $sect
  1368.     }
  1369.  
  1370.     $sect append "\n${JavaCookie::associationAttributeSection}\n\n"
  1371.  
  1372.     [$this assocVariableSet] foreach variable {
  1373.         $variable generate $sect
  1374.     }
  1375.  
  1376.     $sect append "\n${JavaCookie::defaultConstructorSection}\n\n"
  1377.  
  1378.     if {[$this defaultConstructor] != ""} {
  1379.         [$this defaultConstructor] generate $sect
  1380.     }
  1381.  
  1382.     $sect append "\n${JavaCookie::userConstructorSection}\n\n"
  1383.  
  1384.     [$this userConstructorSet] foreach constructor {
  1385.         $constructor generate $sect
  1386.     }
  1387.  
  1388.     $sect append "\n${JavaCookie::methodSection}\n\n"
  1389.  
  1390.     [$this methodSet] foreach method {
  1391.         $method generate $sect
  1392.     }
  1393.  
  1394.     $sect append "\n${JavaCookie::regenerationEndSection}\n"
  1395.  
  1396.     $sect append "\n${JavaCookie::attributeAccessorSection}\n\n"
  1397.  
  1398.     [$this attributeAccessorSet] foreach accessor {
  1399.         $accessor generate $sect
  1400.     }
  1401.  
  1402.     $sect append "\n${JavaCookie::associationAccessorSection}\n\n"
  1403.  
  1404.     [$this associationAccessorSet] foreach accessor {
  1405.         $accessor generate $sect
  1406.     }
  1407.  
  1408.     if {[$this obsoleteCode] != ""} {
  1409.         $sect append "\n${JavaCookie::startObsoleteCodeSection}\n\n"
  1410.         $sect appendSect [$this obsoleteCode]
  1411.         $sect append "\n${JavaCookie::endObsoleteCodeSection}\n\n"
  1412.     }
  1413.  
  1414.     $sect indent -
  1415.     $sect append "} // class [$this name]\n\n"
  1416. }
  1417.  
  1418. method JavaClass::needsType {this typeName} {
  1419.     switch $typeName {
  1420.         Hashtable {return [$this needsHashtable]}
  1421.         Vector {return [$this needsVector]}
  1422.     }
  1423.  
  1424.     [$this assocVariableSet] foreach variable {
  1425.         if {[[$variable type] name] == $typeName} {
  1426.         return 1
  1427.         }
  1428.     }
  1429.  
  1430.     return 0
  1431. }
  1432.  
  1433. # Do not delete this line -- regeneration end marker
  1434.  
  1435. method JavaClass::addAttributeAccessor {this newAttributeAccessor} {
  1436.     [$this attributeAccessorSet] append $newAttributeAccessor
  1437.  
  1438. }
  1439.  
  1440. method JavaClass::removeAttributeAccessor {this oldAttributeAccessor} {
  1441.     [$this attributeAccessorSet] removeValue $oldAttributeAccessor
  1442. }
  1443.  
  1444. method JavaClass::addAssociationAccessor {this newAssociationAccessor} {
  1445.     [$this associationAccessorSet] append $newAssociationAccessor
  1446.  
  1447. }
  1448.  
  1449. method JavaClass::removeAssociationAccessor {this oldAssociationAccessor} {
  1450.     [$this associationAccessorSet] removeValue $oldAssociationAccessor
  1451. }
  1452.  
  1453. method JavaClass::addConstructor {this newConstructor} {
  1454.     [$this constructorSet] append $newConstructor
  1455.  
  1456. }
  1457.  
  1458. method JavaClass::removeConstructor {this oldConstructor} {
  1459.     [$this constructorSet] removeValue $oldConstructor
  1460. }
  1461.  
  1462. method JavaClass::addUserConstructor {this newUserConstructor} {
  1463.     [$this userConstructorSet] append $newUserConstructor
  1464.  
  1465. }
  1466.  
  1467. method JavaClass::removeUserConstructor {this oldUserConstructor} {
  1468.     [$this userConstructorSet] removeValue $oldUserConstructor
  1469. }
  1470.  
  1471. method JavaClass::addAssocVariable {this newAssocVariable} {
  1472.     [$this assocVariableSet] append $newAssocVariable
  1473.  
  1474. }
  1475.  
  1476. method JavaClass::removeAssocVariable {this oldAssocVariable} {
  1477.     [$this assocVariableSet] removeValue $oldAssocVariable
  1478. }
  1479.  
  1480. #---------------------------------------------------------------------------
  1481. #      File:           @(#)javadoccom.tcl    /main/hindenburg/2
  1482. #---------------------------------------------------------------------------
  1483.  
  1484. # Start user added include file section
  1485. # End user added include file section
  1486.  
  1487.  
  1488. Class JavaDocComment : {JavaComment} {
  1489.     constructor
  1490.     method destructor
  1491.     method generate
  1492. }
  1493.  
  1494. constructor JavaDocComment {class this comment} {
  1495.     set this [JavaComment::constructor $class $this $comment]
  1496.     # Start constructor user section
  1497.     # End constructor user section
  1498.     return $this
  1499. }
  1500.  
  1501. method JavaDocComment::destructor {this} {
  1502.     # Start destructor user section
  1503.     # End destructor user section
  1504.     $this JavaComment::destructor
  1505. }
  1506.  
  1507. method JavaDocComment::generate {this sect} {
  1508.     $sect append "/**\n"
  1509.     $sect append "[$this comment]\n"
  1510.     $sect append "*/\n"
  1511. }
  1512.  
  1513. # Do not delete this line -- regeneration end marker
  1514.  
  1515. #---------------------------------------------------------------------------
  1516. #      File:           @(#)javalineco.tcl    /main/hindenburg/2
  1517. #---------------------------------------------------------------------------
  1518.  
  1519. # Start user added include file section
  1520. # End user added include file section
  1521.  
  1522.  
  1523. Class JavaLineComment : {JavaComment} {
  1524.     constructor
  1525.     method destructor
  1526.     method generate
  1527. }
  1528.  
  1529. constructor JavaLineComment {class this comment} {
  1530.     set this [JavaComment::constructor $class $this $comment]
  1531.     # Start constructor user section
  1532.     # End constructor user section
  1533.     return $this
  1534. }
  1535.  
  1536. method JavaLineComment::destructor {this} {
  1537.     # Start destructor user section
  1538.     # End destructor user section
  1539.     $this JavaComment::destructor
  1540. }
  1541.  
  1542. method JavaLineComment::generate {this sect} {
  1543.     set lines [split [$this comment] "\n"]
  1544.  
  1545.     foreach line $lines {
  1546.         $sect append "// $line\n"
  1547.     }
  1548. }
  1549.  
  1550. # Do not delete this line -- regeneration end marker
  1551.  
  1552. #---------------------------------------------------------------------------
  1553. #      File:           @(#)javaexcept.tcl    /main/hindenburg/2
  1554. #---------------------------------------------------------------------------
  1555.  
  1556. # Start user added include file section
  1557. # End user added include file section
  1558.  
  1559.  
  1560. Class JavaException : {JavaPackageName} {
  1561.     constructor
  1562.     method destructor
  1563. }
  1564.  
  1565. constructor JavaException {class this i_identifier} {
  1566.     set this [JavaPackageName::constructor $class $this $i_identifier]
  1567.     # Start constructor user section
  1568.     # End constructor user section
  1569.     return $this
  1570. }
  1571.  
  1572. method JavaException::destructor {this} {
  1573.     # Start destructor user section
  1574.     # End destructor user section
  1575.     $this JavaPackageName::destructor
  1576. }
  1577.  
  1578. # Do not delete this line -- regeneration end marker
  1579.  
  1580.