?? ServiceScope
- ????????:
Serializable
,Comparable<ServiceScope>
Service scope for the
Component
annotation.- ???????:
- 1.3
-
??????
??????????When the component is registered as a service, it must be registered as a bundle scope service and an instance of the component must be created for each bundle using the service.Default element value for annotation.When the component is registered as a service, it must be registered as a prototype scope service and an instance of the component must be created for each distinct request for the service.When the component is registered as a service, it must be registered as a bundle scope service but only a single instance of the component must be used for all bundles using the service. -
????
??????????toString()
static ServiceScope
?????????????????? ??????????????????? ????????(?????? ??????)static ServiceScope[]
values()
???????????????, ??????????????
-
????????
-
SINGLETON
When the component is registered as a service, it must be registered as a bundle scope service but only a single instance of the component must be used for all bundles using the service. -
BUNDLE
When the component is registered as a service, it must be registered as a bundle scope service and an instance of the component must be created for each bundle using the service. -
PROTOTYPE
When the component is registered as a service, it must be registered as a prototype scope service and an instance of the component must be created for each distinct request for the service. -
DEFAULT
Default element value for annotation. This is used to distinguish the default value for an element and should not otherwise be used.
-
-
??????
-
values
???????????????, ??????????????- ??:
- ???????????????????????????
-
valueOf
?????????????????? ??????????????????? ????????(?????? ??????)- ??:
name
- ????????????- ??:
- ?????????????
- ??:
IllegalArgumentException
- ??????????????????NullPointerException
- ???????
-
toString
- ??:
toString
???Enum<ServiceScope>
-