# apiReturn

The <apiReturn> element can return a typed value such as an integer or object classifier.

#### Description

In the <apiReturn> element, the <state>, <keyword>, and <ph> elements are provided to support unexpected contingencies within the value to return.

#### Example

The following example shows an <apiReturn> element for a Visual Basic method.

    <apiOperation id="com.ibm.xtools.rational.xde">
       <apiName>getApplicableStereotypesAsString</apiName>
       <apiOperationDef>
           <apiReturn>
              <apiOperationClassifier href=”String.dita”>String</apiOperationClassifier>
              <apiDefNote>
                  Returns a string that specifies the stereotypes that can be associated
                  with the extensible element.
              </apiDefNote>
           </apiOperationDef>
          <apiReturn>
       </apiOperationDetail>
    </apiOperation>

#### Contained by

apiOperationDef

#### Contains

apiArray, apiData, apiDefNote, apiItemName, apiname, apiOperationClassifier, apiOperationDefItem, apiQualifier, apiRelation, apiType, b, cmdname, codeph, filepath, i, keyword, menucascade, msgnum, msgph, option, parmname, ph, state, sub, sup, synph, systemoutput, tt, u, uicontrol, userinput, varname, wintitle

#### Content model

(apiItemName or apiOperationClassifier or apiQualifier or apiRelation or apiType or apiArray or apiData or apiDefNote or state or keyword or option or parmname or apiname or cmdname or msgnum or varname or wintitle or ph or codeph or synph or filepath or msgph or userinput or systemoutput or b or u or i or tt or sup or sub or uicontrol or menucascade or apiOperationDefItem) (any number)

#### Inheritance

topic/ph reference/ph apiRef/apiDefItem

- apiItemName
  The <apiItemName> element provides the name for substructure of an interface such as parameter of an operation or subfield of a method.
- apiOperationClassifier
  The <apiOperationClassifier> element identifies a returned value that is an instance of a classifier, for example, the class of the returned object.
- apiQualifier
  The <apiQualifier> element specifies a semantic flag that qualifies the interface.
- apiRelation
  The <apiRelation> element specifies a related API item that is part of the declared interface to this API item.
- apiType
  The <apiType> element specifies a type defined by the language itself that is part of the declared interface to this API item.
- apiArray
  The <apiArray> element specifies any type parts, classifier or data within an interface where required.
- apiData
  The <apiData> element specifies the actual value such as the initial value of variable, the default value of a parameter, or the value of a constant.
- apiDefNote
  The <apiDefNote> element provides an optional note element to expand the information about a part of the declared interface for the API item within the <apiDef> element.
- apiOperationDefItem
  The <apiOperationDefItem> element is the specialization of the <apiDefItem> element to support classifier references and to distinguish returns, parameters, and events.

Parent topic: apiOperationDef