View Javadoc

    1   /*
    2    * joey-gen and its relative products are published under the terms
    3    * of the Apache Software License.
    4    *
    5    * Created on 2004/11/09 13:07:41
    6    */
    7   package org.asyrinx.joey.gen.command.java;
    8
    9   import org.asyrinx.joey.gen.model.Element;
    10  import org.asyrinx.joey.gen.model.command.Command;
    11  import org.asyrinx.joey.gen.model.java.AppDomain;
    12  import org.asyrinx.joey.gen.model.java.Entity;
    13  import org.asyrinx.joey.gen.model.java.EntityKey;
    14  import org.asyrinx.joey.gen.model.java.JavaEnumeration;
    15  import org.asyrinx.joey.gen.model.java.JavaVisitor;
    16  import org.asyrinx.joey.gen.model.java.Property;
    17  import org.asyrinx.joey.gen.model.java.Reference;
    18  import org.asyrinx.joey.gen.model.java.visitor.JavaTopDownVisitor;
    19  import org.asyrinx.joey.gen.model.java.visitor.JavaVisitorAdapter;
    20
    21  /***
    22   * @author takeshi
    23   */
    24  public class JavaCommand extends Command implements JavaVisitor {
    25
    26      /***
    27       *
    28       */
    29      public JavaCommand() {
    30          super();
    31      }
    32
    33      public void execute(Element element) {
    34          new JavaVisitorAdapter(new JavaTopDownVisitor(this)).visit(element);
    35      }
    36
    37      /*
    38       * (non-Javadoc)
    39       *
    40       * @see org.asyrinx.joey.gen.model.java.JavaVisitor#visit(org.asyrinx.joey.gen.model.java.AppDomain)
    41       */
    42      public void visit(AppDomain appDomain) {
    43          //may be overriden by subclass
    44      }
    45
    46      /*
    47       * (non-Javadoc)
    48       *
    49       * @see org.asyrinx.joey.gen.model.java.JavaVisitor#visit(org.asyrinx.joey.gen.model.java.Entity)
    50       */
    51      public void visit(Entity javaClass) {
    52          //may be overriden by subclass
    53      }
    54
    55      /*
    56       * (non-Javadoc)
    57       *
    58       * @see org.asyrinx.joey.gen.model.java.JavaVisitor#visit(org.asyrinx.joey.gen.model.java.EntityKey)
    59       */
    60      public void visit(EntityKey entity) {
    61          //may be overriden by subclass
    62      }
    63
    64      /*
    65       * (non-Javadoc)
    66       *
    67       * @see org.asyrinx.joey.gen.model.java.JavaVisitor#visit(org.asyrinx.joey.gen.model.java.JavaEnumeration)
    68       */
    69      public void visit(JavaEnumeration enum) {
    70          //may be overriden by subclass
    71      }
    72
    73      /*
    74       * (non-Javadoc)
    75       *
    76       * @see org.asyrinx.joey.gen.model.java.JavaVisitor#visit(org.asyrinx.joey.gen.model.java.Property)
    77       */
    78      public void visit(Property property) {
    79          //may be overriden by subclass
    80      }
    81
    82      /*
    83       * (non-Javadoc)
    84       *
    85       * @see org.asyrinx.joey.gen.model.java.JavaVisitor#visit(org.asyrinx.joey.gen.model.java.Reference)
    86       */
    87      public void visit(Reference reference) {
    88          //may be overriden by subclass
    89      }
    90
    91  }