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/10/27 3:53:35
    6    */
    7   package org.asyrinx.joey.gen.model.java;
    8
    9   import org.apache.commons.lang.enum.Enum;
    10  import org.asyrinx.joey.gen.model.Element;
    11
    12  /***
    13   * @author takeshi
    14   */
    15  public abstract class Constraint extends Element {
    16
    17      /***
    18       *
    19       */
    20      public Constraint() {
    21          super();
    22      }
    23
    24      /***
    25       * @param parent
    26       */
    27      public Constraint(Element parent) {
    28          super(parent);
    29      }
    30
    31      /***
    32       * @param parent
    33       * @param name
    34       */
    35      public Constraint(Element parent, String name) {
    36          super(parent, name);
    37      }
    38
    39      /***
    40       * @param parent
    41       * @param name
    42       * @param label
    43       */
    44      public Constraint(Element parent, String name, String label) {
    45          super(parent, name, label);
    46      }
    47
    48      /***
    49       * @param name
    50       */
    51      public Constraint(String name) {
    52          super(name);
    53      }
    54
    55      abstract public Scope getScope();
    56
    57      public static class Scope extends Enum {
    58
    59          private Scope(String name) {
    60              super(name);
    61          }
    62
    63          public static final Scope PROPERTY = new Scope("property");
    64
    65          public static final Scope OBJECT = new Scope("object");
    66
    67          public static final Scope OBJECTS = new Scope("objects");
    68
    69          public static final Scope CLASS = new Scope("class");
    70
    71      }
    72  }