javaSynchronizedMethod

The <javaSynchronizedMethod> element within the MethodModifiersopt declaration provides the declaration for a synchronized method.

Description

Possible alternative definitions of the method declaration are the javaFinalMethod, javaNativeMethod, and javaSyncronizedMethod elements.

The <javaSynchronizedMethod> element has the following predefined attributes: name ="Synchronized" and value ="Synchronized".

Example

Click on the following link to open the Java API topic type example in
<javaMethod id="com.ibm.tasks.IImportEngineTask">
   <apiName>addObject</apiName>
   <shortdesc>Add a specific object.</shortdesc>
   <javaMethodDetail>
     <javaMethodDef>
       <javaSynchronizedMethod/>
       <javaMethodAccess value="public"/>
       <javaReturn>
         <javaMethodPrimitive value="boolean"/>
         <apiDefNote>True if the collection has changed, false otherwise.</apiDefNote>
       </javaReturn>
       <javaParam>
         <javaMethodClass>Object</javaMethodClass>
         <apiItemName>obj</apiItemName>
         <apiDefNote>new element in the collection if it has not already been part of it</apiDefNote>
       </javaParam>
    </javaMethodDef>
    <apiDesc>Only objects of type Collectable can be added to this collection.
      If the object is already an element of this collection, it is still contained
      only once in the collection (Set semantics).</apiDesc>
  </javaMethodDetail>
</javaMethod>

Processing Expectations

Contained by

javaMethodDef

Content model

no content

Inheritance

topic/state reference/state apiRef/apiQualifier apiOperation/apiQualifier