org.glassfish.hk2.api.ServiceLocator . A service
marked with this annotation has the default scope of jakarta.inject.Singleton ,
but any other scope annotation placed on the class will override that default.
This annotation is read at build time using the hk2-inhabitant-generator
and information about the service is placed into a file in the
associated jar. The usual way to get these services into
a org. is to use a
org. as provided by the
org.
method. An easier way to do that is with the
org.
utility.
org.glassfish.hk2.api.ClassAnalyzer
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: The name of theClassAnalyzer service that should
be used to analyze this classThe name of the |
| public String | |
| public String |
| analyzer | back to summary |
|---|---|
| public String analyzer() The name of the
| |
| metadata | back to summary |
|---|---|
| public String metadata() Additional metadata that goes into the inhabitants file.
The value is "key={value},key={value1,value2,...},..." format.
This information is accessible from While this is limited in expressiveness, metadata has a performance advantage in it that it can be read without even creating a classloader for this class. For example, this feature is used by the configuration module so that the config file can be read without actually loading the classes. | |
| name | back to summary |
|---|---|
| public String name() Name of the service.
The default value "" indicates that the inhabitant has no name. | |