View Javadoc

    1   /*
    2    * Joey and its relative products are published under the terms
    3    * of the Apache Software License.
    4    */
    5   /*
    6    * Created on 2004/01/27
    7    */
    8   package org.asyrinx.joey.gen.model.java;
    9
    10  import org.asyrinx.joey.gen.model.AbstractEnumeration;
    11
    12  /***
    13   * @author akima
    14   */
    15  public class JavaEnumeration extends AbstractEnumeration implements Type {
    16
    17      privateong> String packageName = null;
    18
    19      private Type valueTypeObj = null;
    20
    21      /***
    22       *
    23       */
    24      public JavaEnumeration() {
    25          super();
    26      }
    27
    28      /***
    29       * @param parent
    30       * @param name
    31       */
    32      public JavaEnumeration(AppDomain parent, String name) {
    33          super(parent, name);
    34      }
    35
    36      /***
    37       * @param parent
    38       * @param name
    39       * @param type
    40       */
    41      public JavaEnumeration(AppDomain parent, String name, String type) {
    42          super(parent, name, type);
    43      }
    44
    45      /*
    46       * (non-Javadoc)
    47       *
    48       * @see org.asyrinx.joey.gen.model.Element#getParentElement()
    49       */
    50      public AppDomain getParent() {
    51          return (AppDomain) super.getParentElement();
    52      }
    53
    54      /*
    55       * (non-Javadoc)
    56       *
    57       * @see org.asyrinx.joey.gen.model.java.Type#getFqn()
    58       */
    59      public String getFqn() {
    60          return getPackage() + PACKAGE_SEPARATER + getName();
    61      }
    62
    63      /*
    64       * (non-Javadoc)
    65       *
    66       * @see org.asyrinx.joey.gen.model.java.Type#getPackage()
    67       */
    68      public String getPackage() {
    69          return getPackageName();
    70      }
    71
    72      /*
    73       * (non-Javadoc)
    74       *
    75       * @see org.asyrinx.joey.gen.model.java.Type#isPrimitive()
    76       */
    77      public boolean isPrimitive() {
    78          return false;
    79      }
    80
    81      /*
    82       * (non-Javadoc)
    83       *
    84       * @see org.asyrinx.joey.gen.model.java.Type#toClass()
    85       */
    86      public Type toClass() {
    87          return this;
    88      }
    89
    90      /*
    91       * (non-Javadoc)
    92       *
    93       * @see org.asyrinx.joey.gen.model.java.Type#toPrimitive()
    94       */
    95      public Type toPrimitive() {
    96          return null;
    97      }
    98
    99      /*
    100      * (non-Javadoc)
    101      *
    102      * @see org.asyrinx.joey.gen.model.java.Type#getCategory()
    103      */
    104     public TypeCategory getCategory() {
    105         return TypeCategory.ENUM;
    106     }
    107
    108     /*
    109      * (non-Javadoc)
    110      *
    111      * @see org.asyrinx.joey.gen.model.java.Type#isNumber()
    112      */
    113     public boolean isNumber() {
    114         return false;
    115     }
    116
    117     /***
    118      * @return Returns the packageName.
    119      */
    120     public String getPackageName() {
    121         return</strong> packageName;
    122     }
    123
    124     /***
    125      * @param packageName
    126      *            The packageName to set.
    127      */
    128     publicong> void setPackageName(String packageName) {
    129         this.packageName = packageName;
    130     }
    131
    132     /***
    133      * @return Returns the valueTypeObj.
    134      */
    135     public Type getValueTypeObj() {
    136         return valueTypeObj;
    137     }
    138
    139     /***
    140      * @param valueTypeObj
    141      *            The valueTypeObj to set.
    142      */
    143     public void setValueTypeObj(Type valueTypeObj) {
    144         this.valueTypeObj = valueTypeObj;
    145     }
    146 }