Previous Topic Next topic Print topic


NETJVM 

The CUSTOM-ATTRIBUTE Clause

The CUSTOM-ATTRIBUTE clause specifies an attribute that provides metadata (information) about a managed code native data item or a property that will be visible using reflection.

Format 1

{ CUSTOM-ATTRIBUTE IS  class-name-1 [ ( {parameter-1} . . . ) ] }... 

Syntax Rules for Format 1

  1. This list of parameters must match a constructor defined for class-name-1. Each parameter-1 must be one of the following:
    • An ordinary parameter that is the argument to the constructor for that attribute. For example:

      custom-attribute is Marshal-Attribute(3)

    • A named parameter that corresponds to a property defined on the custom attribute class. For example:

      custom-attribute is webservice("Description"="My service")

General Rules

  1. The custom attribute specified becomes part of the metadata describing the subject of the entry and is visible to a reflector.
  2. Languages for JVM support annotations, which are similar broadly to attributes in COBOL.
Previous Topic Next topic Print topic