示例#1
0
  /**
   * Retrieves the type attribute.
   *
   * @return Value of the type attribute.
   * @see #ATTRIBUTE_TYPE
   */
  public GrammarType getType() {
    final String type = getTypename();

    if (type == null) {
      return null;
    }

    return GrammarType.valueOfAttribute(type);
  }
示例#2
0
  /**
   * Sets the type attribute.
   *
   * @param type Value of the type attribute.
   * @see #ATTRIBUTE_TYPE
   */
  public void setType(final GrammarType type) {
    final String str = type.getType();

    setType(str);
  }