Annotation Interface ObjectClassDefinition
This annotation can be used without defining any element values since
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 may only be used on annotation types and interface types. Use on concrete or abstract class types is unsupported. If applied to an interface then all methods inherited from super types are included as attributes.
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.
- See Also:
-
- "The OCD element of a Meta Type Resource."
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe human readable description of this ObjectClassDefinition.String[]
The factory PIDs associated with this ObjectClassDefinition.Icon[]
The icon resources associated with this ObjectClassDefinition.The id of this ObjectClassDefinition.The localization resource of this ObjectClassDefinition.The human readable name of this ObjectClassDefinition.String[]
The PIDs associated with this ObjectClassDefinition.
-
Element Details
-
id
String idThe 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 thepid()
orfactoryPid()
element.- See Also:
-
- "The id attribute of the OCD element of a Meta Type Resource."
- Default:
- ""
-
name
String nameThe 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 belocalized
.- See Also:
-
- "The name attribute of the OCD element of a Meta Type Resource."
- Default:
- ""
-
description
String descriptionThe 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 belocalized
.- See Also:
-
- "The description attribute of the OCD element of a Meta Type Resource."
- Default:
- ""
-
localization
String localizationThe 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 for this ObjectClassDefinition is the string "OSGI-INF/l10n/" followed by the
id()
.- See Also:
-
- "The localization attribute of the MetaData element of a Meta Type Resource."
- Default:
- ""
-
pid
String[] pidThe PIDs associated with this ObjectClassDefinition.For each specified PID, a
Designate
element with a pid attribute is generated thatreferences
this ObjectClassDefinition.The
Designate
annotation can also be used to associate a Declarative Services component with an ObjectClassDefinition and generate aDesignate
element.A special string (
"$"
) can be used to specify the fully qualified name of the annotated type as a PID. For example:@ObjectClassDefinition(pid="$")
Tools creating a Meta Type Resource from this annotation must replace the special string with the fully qualified name of the annotated type.- See Also:
-
- "The pid attribute of the Designate element of a Meta Type Resource."
Designate
- Default:
- {}
-
factoryPid
String[] factoryPidThe factory PIDs associated with this ObjectClassDefinition.For each specified factory PID, a
Designate
element with a factoryPid attribute is generated thatreferences
this ObjectClassDefinition.The
Designate
annotation can also be used to associate a Declarative Services component with an ObjectClassDefinition and generate aDesignate
element.A special string (
"$"
) can be used to specify the fully qualified name of the annotated type as a factory PID. For example:@ObjectClassDefinition(factoryPid="$")
Tools creating a Meta Type Resource from this annotation must replace the special string with the fully qualified name of the annotated type.- See Also:
-
- "The factoryPid attribute of the Designate element of a Meta Type Resource."
Designate
- Default:
- {}
-
icon
Icon[] iconThe icon resources associated with this ObjectClassDefinition.For each specified
Icon
, anIcon
element is generated for this ObjectClassDefinition. If not specified, noIcon
elements will be generated.- See Also:
-
- "The Icon element of a Meta Type Resource."
- Default:
- {}
-