Package org.glassfish.hk2.api
Annotation Type Customizer
Gives the type (and optional name) of a customizer service
to use when an unknown method on a bean interface is
encountered. Customizers are found in the hk2 service
registry
This annotation is for use with the hk2-xml configuration system
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionboolean
If true then if a bean method is not mirrored in the customizer a RuntimeException will be thrown.String[]
The name of the customizer to lookup for this bean
-
Element Details
-
value
Class<?>[] valueThe class of the customizer to lookup for this bean- Returns:
- the class of the customizer for this bean
-
name
String[] nameThe name of the customizer to lookup for this bean- Returns:
- the name of the customizer for this bean
- Default:
{}
-
failWhenMethodNotFound
boolean failWhenMethodNotFoundIf true then if a bean method is not mirrored in the customizer a RuntimeException will be thrown. Otherwise unknown methods are treated as a no-op. Setting this to false must be used with care as any method with a scalar return will throw a null pointer exception if no method can be found in the customizer methods since converting null to a scalar value does not work- Returns:
- true if an unknown method called on a bean at runtime which does not have a mirrored method on the customizer should raise a RuntimeException
- Default:
true
-