javaFinalField

The <javaFinalField> element provides a flag within the FieldModifiersopt that declares that the fields introduced by the declaration are final fields.

Description

Both class and instance variables (static and non-static fields) can be declared final. Every field declaration in the body of an interface is implicitly public, static, and final. Possible alternative definitions of the FieldModifier declaration are the <javaStaticField>, <javaTransientField>, and <javaVolatileField> elements.

Example

Click on the following link to open the Java API topic type example in
<javaField id="com.ibm.xtools.pluglets.engine.PlugletException">
   <apiName>CASE_INSENSITIVE_ORDER</apiName>
   <shortDesc>
       A Comparator that orders String objects as by compareToIgnoreCase.
       This comparator is serializable.
   </shortDesc>
   <javaFieldDetail>
      <javaFieldDef>
         <javaFinalField/>
         <javaStaticField/>
         <javaFieldAccess value="public"/>
         <javaFieldInterface
              href=”http://java.sun.com/…/Comparator.html”
              format=”html” scope=”external”>
          Comparator
          </javaFieldInterface>
      </javaFieldDef>
      <apiDesc>Note that this Comparator does not take locale into account,
             and will result in an unsatisfactory ordering for certain locales.
             The java.text package provides Collators to allow locale-sensitive
             ordering.
       </apiDesc>
   </javaFieldDetail>
   <related-links>
      <link href="http://java.sun.com/../
              collator.html#compare(java.lang.String, java.lang.String)" format="html">
           <linktext>Collator.compare(String, String)<linktext>
       </link>
    </related-links>
</javaField>

Processing Expectations

Contained by

javaFieldDef

Content model

no content

Inheritance

topic/state reference/state apiRef/apiQualifier apiValue/apiQualifier