<div class="method item{{#if access}} {{access}}{{/if}}">
    <div id="method_{{name}}" class="title">
        <span class="source-link"><a href="{{foundAt}}">`{{file}}:{{line}}`</a></span>
        <h3 class="{{#if deprecated}}deprecated{{/if}}">
            {{ensure-access access}}
            {{#if static}}static{{/if}}
            {{#if final}}final{{/if}}
            {{name}}({{paramsList}}){{#if return}}: {{#crossLink return.type}}{{/crossLink}}{{/if}}
        </h3>
    </div>

    {{#if overwritten_from}}
      <div class="overwrites">
        Overwrites {{#crossLink (concat overwritten_from/class "/" overwritten_from/name ":method")}}{{overwritten_from/class}}.{{overwritten_from/name}}{{/crossLink}}
      </div>
    {{else}}
      {{#if extended_from}}
        <div class="inherited">
          Inherited from {{#crossLink (concat extended_from "/" name ":method")}}{{extended_from}}{{/crossLink}}
        </div>
      {{/if}}
    {{/if}}

    {{#if deprecated}}
      <div class="deprecation-message">
        {{#if deprecationMessage}}
          <p><strong>Deprecated:</strong> {{{deprecationMessage}}}</p>
        {{else}}
          <p><strong>Deprecated:</strong> This method is deprecated.</p>
        {{/if}}
      </div>
    {{/if}}

    <div class="method-description">{{{methodDescription}}}</div>

    {{#if params}}
      <div class="params">
        <h4>Parameters:</h4>
        <table>
          <thead>
          <tr>
            <th>Name</th>
            <th>Type</th>
            <th>Attribute</th>
            <th>Description</th>
          </tr>
          </thead>
          <tbody>
          {{#each params}}
            <tr>
              <td>{{name}}</td>
              <td>{{#crossLink type}}{{/crossLink}}</td>
              <td>
                <ul>
                  {{#if optional}}<li>optional</li>{{/if}}
                  {{#if optdefault}}<li>default: {{{optdefault}}}</li>{{/if}}
                  {{#if multiple}}<li>multiple</li>{{/if}}
                </ul>
              </td>
              <td>{{{description}}}</td>
            </tr>

            {{#each props}}
              <tr>
                <td>{{../name}}.{{name}}</td>
                <td>{{#crossLink type}}{{/crossLink}}</td>
                <td>
                  <ul>
                    {{#if optional}}<li>optional</li>{{/if}}
                    {{#if optdefault}}<li>default: {{{optdefault}}}</li>{{/if}}
                    {{#if multiple}}<li>multiple</li>{{/if}}
                  </ul>
                </td>
                <td>{{{description}}}</td>
              </tr>
            {{/each}}
          {{/each}}
          </tbody>
        </table>
      </div>
    {{/if}}

    {{#if return}}
      <div class="return">
        <h4>Return:</h4>
        <div>
          {{#if return.type}}<span class="return-type">{{#crossLink return.type}}{{/crossLink}}</span>{{/if}}
          <span class="return-description">{{{return.description}}}</span>
        </div>
      </div>
    {{/if}}

    {{#if throws}}
      <div class="throws">
        <h4>Throws:</h4>
        <div>
          {{#if throws.type}}<span class="throws-type">{{#crossLink throws.type}}{{/crossLink}}</span>{{/if}}
          <span class="throws-description">{{{throws.description}}}</span>
        </div>
      </div>
    {{/if}}

    {{#if example}}
      <h4>Example:</h4>
      {{{example}}}
    {{/if}}
</div>
