code: public String gaTypeAccessor(final TypeRef ele) {
      String _switchResult = null;
      EObject _eContainer = ele.eContainer();
      final EObject cnt = _eContainer;
      boolean _matched = false;
      if (cnt instanceof AbstractElement) {
        _matched=true;
        String _gaRuleElementAccessor = this.gaRuleElementAccessor(((AbstractElement)cnt));
        _switchResult = (_gaRuleElementAccessor + ".getType()");
      }
      if (!_matched) {
        if (cnt instanceof AbstractRule) {
          _matched=true;
          String _gaRuleAccessor = this.gaRuleAccessor(((AbstractRule)cnt));
          _switchResult = (_gaRuleAccessor + ".getType()");
        }
      }
      if (!_matched) {
        String _name = ele.eContainer().eClass().getName();
        String _plus = ("<error: unknown type " + _name);
        _switchResult = (_plus + ">");
      }
      return _switchResult;
    }
docs: Returns the invocation of an element or rule accessor, including the .getType() call.
  Example1: getFooRule().getType()
  Example2: getBarRule().getFooAction().getType()