attributes() {
    let iter, index = 0, type = this;
    if (this.superType) {
      iter = this.superType.attributes();
    }

    return {
      [Symbol.iterator]() {
        return this
      },

      /**
       * @return {Object} item
       * @return {boolean} item.done
       * @return {metamodel.Attribute} item.value
       */
      next() {
        if (iter) {
          let item = iter.next();
          if (item.done) {
            iter = null;
          } else {
            return item;
          }
        }

        if (index < type.declaredAttributes.length) {
          return {
            value: type.declaredAttributes[index++],
            done: false
          }
        } else {
          return {done: true}
        }
      }
    }
  }
/**
   * An iterator which returns all attributes declared by this type and inherited form all super types
   * @return {Iterator<metamodel.Attribute>}
   */
An iterator which returns all attributes declared by this type and inherited form all super types
@return {Iterator}
An iterator which returns all attributes declared by this type and inherited form all super types @return { Iterator }
attributes() {
    let iter, index = 0, type = this;
    if (this.superType) {
      iter = this.superType.attributes();
    }
    return {
      [Symbol.iterator]() {
        return this
      },
      next() {
        if (iter) {
          let item = iter.next();
          if (item.done) {
            iter = null;
          } else {
            return item;
          }
        }
        if (index < type.declaredAttributes.length) {
          return {
            value: type.declaredAttributes[index++],
            done: false
          }
        } else {
          return {done: true}
        }
      }
    }
  }
attributes ( ) { let iter , index = 0 , type = this ; if ( this . superType ) { iter = this . superType . attributes ( ) ; } return { [ Symbol . iterator ] ( ) { return this } , next ( ) { if ( iter ) { let item = iter . next ( ) ; if ( item . done ) { iter = null ; } else { return item ; } } if ( index < type . declaredAttributes . length ) { return { value : type . declaredAttributes [ index ++ ] , done : false } } else { return { done : true } } } } }
An iterator which returns all attributes declared by this type and inherited form all super types
 @return {Iterator<metamodel.Attribute>}
An iterator which returns all attributes declared by this type and inherited form all super types @return { Iterator<metamodel . Attribute > }
/**
       * @return {Object} item
       * @return {boolean} item.done
       * @return {metamodel.Attribute} item.value
       */