org.osgi.service.metatype.annotations
Annotation Type ObjectClassDefinition


@Retention(value=CLASS)
@Target(value=TYPE)
public @interface ObjectClassDefinition

Generate a Meta Type Resource using the annotated type as an ObjectClassDefinition.

This annotation can be used without defining any element values as defaults can be generated from the annotated type. Each method of the annotated type has an implied AttributeDefinition annotation if not explicitly annotated.

This annotation is not processed at runtime. It must be processed by tools and used to generate a Meta Type Resource document for the bundle.

Author:
$Id: 1f2e2b936147451fe0a3d424fb6c5bb5525b48c2 $
See Also:
"The OCD element of a Meta Type Resource."

Optional Element Summary
 String description
          The human readable description of this ObjectClassDefinition.
 String[] factoryPid
          The factory PIDs associated with this ObjectClassDefinition.
 Icon[] icon
          The icon resources associated with this ObjectClassDefinition.
 String id
          The id of this ObjectClassDefinition.
 String localization
          The localization resource of this ObjectClassDefinition.
 String name
          The human readable name of this ObjectClassDefinition.
 String[] pid
          The PIDs associated with this ObjectClassDefinition.
 

id

public abstract String id
The id of this ObjectClassDefinition.

If not specified, the id of this ObjectClassDefinition is the fully qualified name of the annotated type using the dollar sign ('$' \u0024) to separate nested class names from the name of their enclosing class. The id is not to be confused with a PID which can be specified by the pid() or factoryPid() element.

See Also:
"The id attribute of the OCD element of a Meta Type Resource."
Default:
""

name

public abstract String name
The human readable name of this ObjectClassDefinition.

If not specified, the name of this ObjectClassDefinition is derived from the id(). For example, low line ('_' \u005F) and dollar sign ('$' \u0024) are replaced with space (' ' \u0020) and space is inserted between camel case words.

If the name begins with the percent sign ('%' \u0025), the name can be localized.

See Also:
"The name attribute of the OCD element of a Meta Type Resource."
Default:
""

description

public abstract String description
The human readable description of this ObjectClassDefinition.

If not specified, the description of this ObjectClassDefinition is the empty string.

If the description begins with the percent sign ('%' \u0025), the description can be localized.

See Also:
"The description attribute of the OCD element of a Meta Type Resource."
Default:
""

localization

public abstract String localization
The localization resource of this ObjectClassDefinition.

This refers to a resource property entry in the bundle that can be augmented with locale information. If not specified, the localization resource of this ObjectClassDefinition is the string "OSGI-INF/l10n/" followed by the fully qualified name of the annotated type.

See Also:
"The localization attribute of the OCD element of a Meta Type Resource."
Default:
""

pid

public abstract String[] pid
The PIDs associated with this ObjectClassDefinition.

For each specified PID, a Designate element with a pid attribute is generated that references this ObjectClassDefinition. If not specified, no Designate elements with pid attributes will be generated.

See Also:
"The pid of the Designate element of a Meta Type Resource."
Default:
{}

factoryPid

public abstract String[] factoryPid
The factory PIDs associated with this ObjectClassDefinition.

For each specified factory PID, a Designate element with a factoryPid attribute is generated that references this ObjectClassDefinition. If not specified, no Designate elements with factoryPid attributes will be generated.

See Also:
"The factoryPid of the Designate element of a Meta Type Resource."
Default:
{}

icon

public abstract Icon[] icon
The icon resources associated with this ObjectClassDefinition.

For each specified Icon, an Icon element is generated for this ObjectClassDefinition. If not specified, no Icon elements will be generated.

See Also:
"The Icon element of a Meta Type Resource."
Default:
{}


Copyright © 2014 aQute SARL. All rights reserved.